Question in Arrays - Give an advice

The following problem has to do with Arrays. I would appreciate if someone could give an explanation in this assumption below:

If we assume that SIZE is a catholic constant with value 100 and A is Array of size SIZE with n stored elements from left to right. If it is assumed that Array's elements are not initialised and at n first position there are numbers from 1 to n in ascending numerical order, what will be the printout of the following command and why ?
for (i=0; i<SIZE; i++)
printf("%d, " A[i]);
Thanks in advance...
Do you think of an array which has data and uninitialised data?

The result depends on the compiler and situations. Someone compiler fills up the variables with zero value automatically. Someone don't do it. So it is possible that you get zero values but the other possibility that you can see uninitialised data ('random numbers') on the screen.

It is rewarding to fill up the variables and arrays with zero.
Last edited on
The question is nonsensical.
Last edited on
You should never ask this question because it should never happen. DON'T CREATE AN ARRAY WITHOUT INITIALIZING THE ELEMENTS TO SOMETHING EVEN IF IT IS ONLY ZERO!
Topic archived. No new replies allowed.