Exercise: Complicated Declarations

Questions for: Complicated Declarations

What do the following declaration signify?
int *ptr[30];
A:
ptr is a pointer to an array of 30 integer pointers.
B:
ptr is a array of 30 pointers to integers.
C:
ptr is a array of 30 integer pointers.
D:
ptr is a array 30 pointers.
Answer: B
No answer description is available. Let's discuss.
Declare the following statement?
"An array of three pointers to chars".
A:
char *ptr[3]();
B:
char *ptr[3];
C:
char (*ptr[3])();
D:
char **ptr[3];
Answer: B
No answer description is available. Let's discuss.
Ad Slot (Above Pagination)
Quiz