In C, which of the following is TRUE about arrays and pointers ?
Tripura Public Service Commission - 2026,
Answer: C
The true statement is that array[i] is equivalent to *(array + i).
C defines subscripting in terms of pointer arithmetic: in an expression the array name becomes a pointer to its first element, adding i moves the pointer i elements along, and the dereference reads that element. The two forms are interchangeable by the language definition (which is also why the odd form i[array] compiles).
sizeof(array) gives the size of the whole array, for example 40 for ten 4-byte ints, not the size of a pointer; they coincide only for an array parameter, which is really a pointer. An array name is not a modifiable lvalue, so array++ is an error. Since C is true, 'None of these' is wrong.
Please log in or register to report this question.