Discussion
typedef int (*PFI)(char *, char *)creates:
Answer: A
Correct answer: type PFI, for pointer to function (of two char * arguments) returning int
The parentheses around *PFI bind the asterisk to the name before the function parameter list is applied, so the name is a pointer first and a pointer to a function second. Such aliases are the standard way of making callback tables readable: PFI compare; is a good deal clearer than writing the full declarator each time.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development