What is the meaning of the following declaration in C language? int (*d)[10];
2017
What is the meaning of the following declaration in C language? int (*d)[10];
Answer: B. d is a pointer to an array of 10 integers — In the declaration int (*d)[10]; the parentheses make d a pointer first, and [10] applies to the array type. So d is a pointer to an array of 10 integers.
- A.
It will result in compile time error
- B.
d is a pointer to an array of 10 integers
- C.
d is pointer to integer array
- D.
d is an array of 10 integer pointers
Attempted by 206 students.
Show answer & explanation
Correct answer: B
In the declaration int (*d)[10]; the parentheses make d a pointer first, and [10] applies to the array type. So d is a pointer to an array of 10 integers.
Loading lesson…