C variable decleration on gcc compiler - compile time error.
- by liv2hak
Assume the following C variable decleration
int *A[10] , B[10][10];
Of the following expressions
A[2]
A[2][3]
B[1]
B[2][3]
which will not give compile time errors if used as left hand sides of assignment statements in a C program.
A) 1,2 and 4 only
B) 2,3, and 4 only
C) 2 and 4 only
D) 4 only
I have tried this on a gcc compiler.I assigned the value '0' to all the above variables.Only the third one showed an error.I can't really understand the reason.Can someone please expalin why that is.?
Thanks