C-Complicated Declarations MCQ Questions and Answers

Practice Mode
Showing 10 of 32 questions
Q21
Meaning of: int *(*(*arr[5])())();
  • A Array of function pointers
  • B Array of 5 pointers to functions returning pointer to function returning pointer to int
  • C Pointer to array of functions
  • D Complex invalid declaration
Answer: Option B
Explanation: Array of 5 pointers to functions returning pointer to function returning pointer to int
Q22
What is: void (*fp)(int, float);
  • A Function taking pointer parameters
  • B Pointer to function taking int and float, returning void
  • C Array of function pointers
  • D Function returning void pointer
Answer: Option B
Explanation: Pointer to function taking int and float, returning void
Q23
Interpret: char (*(*x[3])())[5];
  • A Array of pointers to arrays
  • B Pointer to array of function pointers
  • C Array of 3 pointers to functions returning pointer to array of 5 chars
  • D Invalid declaration
Answer: Option C
Explanation: Array of 3 pointers to functions returning pointer to array of 5 chars
Q24
What does: int (*p[5])(); declare?
  • A Pointer to array of functions
  • B Array of 5 integers
  • C Array of 5 pointers to functions returning int
  • D Function returning array
Answer: Option C
Explanation: Array of 5 pointers to functions returning int
Q25
Meaning of: double *(**ptr)[10];
  • A Pointer to array of doubles
  • B Pointer to pointer to array of 10 pointers to double
  • C Array of pointers to double
  • D Double pointer to array
Answer: Option B
Explanation: Pointer to pointer to array of 10 pointers to double
Q26
What is: int (*(*(*func)())[5])();
  • A Function returning array of pointers
  • B Pointer to function returning pointer to array of 5 pointers to functions returning int
  • C Array of function pointers
  • D Invalid complex declaration
Answer: Option B
Explanation: Pointer to function returning pointer to array of 5 pointers to functions returning int
Q27
Interpret: void (*(*array[5])())(int);
  • A Array of function pointers
  • B Array of 5 pointers to functions returning pointer to function taking int and returning void
  • C Pointer to array of functions
  • D Function returning array
Answer: Option B
Explanation: Array of 5 pointers to functions returning pointer to function taking int and returning void
Q28
What does: char (**p[10])(int); declare?
  • A Array of function pointers
  • B Pointer to array of pointers
  • C Array of 10 pointers to pointers to functions taking int and returning char
  • D Invalid declaration
Answer: Option C
Explanation: Array of 10 pointers to pointers to functions taking int and returning char
Q29
Meaning of: int (*(*(*foo)[5])())[10];
  • A Pointer to array of function pointers
  • B Pointer to array of 5 pointers to functions returning pointer to array of 10 integers
  • C Array of pointers to arrays
  • D Function returning pointer to array
Answer: Option B
Explanation: Pointer to array of 5 pointers to functions returning pointer to array of 10 integers
Q30
What is: float *(*(*ptr)())[5];
  • A Pointer to array of floats
  • B Pointer to function returning pointer to array of 5 pointers to float
  • C Array of function pointers
  • D Function returning pointer
Answer: Option B
Explanation: Pointer to function returning pointer to array of 5 pointers to float
Questions and Answers for Competitive Exams Various Entrance Test