Saturday, 7 September 2013

C array size declaration means nothing?

C array size declaration means nothing?

char arr1 [0];
arr1[50] = 'A';
char arr2 [0] = {1, 1, 1, 1, 1}; //gives compiler warning
Why do the above compile normally?
And how come only the second gives me a warning?

No comments:

Post a Comment