Discussion
In the c library function void (*signal(int sig, void (*func)(int)))(int), which statement is true with respect to func?
Answer: A
Correct answer: func is a pointer to the function
Read the declaration outwards: void (*func)(int) makes func a pointer to a function taking an int and returning nothing - the handler to be installed. signal itself returns a pointer of the same kind, namely the previous handler, which is what makes the declaration so hard to read.
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