In the context of array types, what is the key difference between int *arr[5] and int (*arr)
In the context of array types, what is the key difference between int *arr[5] and int (*arr)
[5]?
Show answerHide answer
Correct answer: (D) First is an array of pointers to integers, second is a pointer to an array of integers
Explanation
[] binds tighter than *, so int *arr[5] is an array of 5 pointers to int. The parentheses in int (*arr)[5] make arr a single pointer to an array of 5 ints.