C-Complicated Declarations MCQ Questions and Answers

Practice Mode
Showing 10 of 32 questions
Q11
What do the following declaration signify? char **argv;
  • A argv is a pointer to pointer.
  • B argv is a pointer to a char pointer.
  • C argv is a function pointer.
  • D argv is a member of function pointer.
Answer: Option B
Q12
What do the following declaration signify? char *scr;
  • A scr is a pointer to pointer variable.
  • B scr is a function pointer.
  • C scr is a pointer to char.
  • D scr is a member of function pointer.
Answer: Option C
Q13
What does the following declaration mean? int (*ptr)[10];
  • A Array of 10 pointers to integers
  • B Pointer to an array of 10 integers
  • C Array of 10 integers
  • D Pointer to pointer to integer
Answer: Option B
Explanation: Pointer to an array of 10 integers
Q14
What does the declaration: int *f(); indicate?
  • A Pointer to function returning integer
  • B Function returning pointer to integer
  • C Array of functions
  • D Illegal declaration
Answer: Option B
Explanation: Function returning pointer to integer
Q15
What is the meaning of: int (*f)();
  • A Function returning pointer to integer
  • B Pointer to function returning integer
  • C Array of function pointers
  • D Function taking no arguments returning integer
Answer: Option B
Explanation: Pointer to function returning integer
Q16
Interpret: char *(*(*a[])())();
  • A Array of function pointers
  • B Pointer to array of functions
  • C Array of pointers to functions returning pointer to function returning pointer to char
  • D Complex invalid declaration
Answer: Option C
Explanation: Array of pointers to functions returning pointer to function returning pointer to char
Q17
What does void (*signal(int, void (*fp)(int)))(int); declare?
  • A Pointer to function
  • B Function returning integer
  • C Function taking int and function pointer, returning function pointer
  • D Array of function pointers
Answer: Option C
Explanation: Function taking int and function pointer, returning function pointer
Q18
What is: int *(*ptr)();
  • A Function returning pointer to pointer
  • B Pointer to function returning pointer to int
  • C Array of pointers to integers
  • D Pointer to array of functions
Answer: Option B
Explanation: Pointer to function returning pointer to int
Q19
Interpret: int (*(*foo)(void ))[5];
  • A Function returning pointer to array
  • B Pointer to function returning pointer to array of 5 integers
  • C Array of 5 function pointers
  • D Pointer to array of 5 functions
Answer: Option B
Explanation: Pointer to function returning pointer to array of 5 integers
Q20
What does: float (*(*x())[5])(); declare?
  • A Pointer to array of functions
  • B Function returning pointer to array of 5 pointers to functions returning float
  • C Array of function pointers returning float
  • D Pointer to function returning array
Answer: Option B
Explanation: Function returning pointer to array of 5 pointers to functions returning float
Questions and Answers for Competitive Exams Various Entrance Test