C Quiz – 108 | Question 4
Both of the following declarations for function pointers are equivalent. Second one (i.e. with typedef) looks cleaner.
/* First Declaration */int (*funPtr1)(int), (*funPtr2)(int); /* Second Declaration*/typedef int (*funPtr)(int); funPtr funPtr1, funPtr2; |
chevron_right
filter_none
(A) TRUE
(B) FALSE
Answer: (A)
Explanation: Usually data type of function pointers tends to be cryptic and that’s why it’s used in conjunction with typedef. Think of a function pointer which is pointing to a function that accepts a function pointer and that returns a function pointer. This can be used simplified using typedef otherwise it’s going to very difficult to read/understand!
Quiz of this Question
Recommended Posts:
- C Quiz - 103 | Question 2
- C Quiz - 103 | Question 4
- C Quiz - 103 | Question 3
- C Quiz - 101 | Question 5
- C Quiz - 102 | Question 1
- C Quiz - 102 | Question 2
- C Quiz - 102 | Question 3
- C Quiz - 102 | Question 4
- C Quiz - 102 | Question 5
- C Quiz - 103 | Question 1
- C Quiz - 106 | Question 4
- C Quiz - 110 | Question 1
- C Quiz - 110 | Question 2
- C Quiz - 110 | Question 3
- C Quiz - 110 | Question 4



