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.
Please log in or register to report this question.