C Programming - Complicated Declarations - Discussion


Is the following declaration correct?
typedef *void (*pfun)(**int, *float);

[A]. Yes
[B]. No

Answer: Option B


No answer description available for this question.

Piya said: (Aug 11, 2010)  
i want the answer description

Kaustubh said: (Jun 27, 2011)  
It would have been valid had it been

typedef void* (*pfun)(**int, *float);

instead. * before void does not make any sense.

Shubhendu Amitabh said: (Sep 15, 2011)  
typedef is used for giving the new name for whatever comes after it, but here no another name is given.eg

typedef int num;
now if you declare num var=10;
it will be considered as int var=10;

Anand said: (Jul 7, 2013)  
typedef void* (*pfun)(int**,float**); === >> correct !.

typedef *void (*pfun)(**int, *float); === >> wrong ! the asterisk is in wrong place :P.

This is the correct answer.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.