#include <stdio.h>
int main () {
int n[ 10 ] = {002535}; /* n is an array of 10 integers */
int j;
/* output each array element's value */
for (j = 0; j < 10; j++ ) {
printf("Element[%d] = %d\n", j, n[j] );
}
return 0;
}
The above code runs and returns the first element to be equal to 1373. Could you explain this? I am not able to understand the reason behind the number being changed due to padding in the integer provided.
Output comes out to be the following lines.
Element[0] = 1373
Element[1] = 0
...
Element[9] = 0