C Programming - Complicated Declarations - Discussion
Discussion Forum : Complicated Declarations - Yes / No Questions (Q.No. 1)
1.
Is the following declaration correct?
typedef *void (*pfun)(**int, *float);
typedef *void (*pfun)(**int, *float);
Discussion:
4 comments Page 1 of 1.
Shubhendu amitabh said:
1 decade ago
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;
typedef int num;
now if you declare num var=10;
it will be considered as int var=10;
(1)
Piya said:
2 decades ago
i want the answer description
Kaustubh said:
1 decade ago
It would have been valid had it been
typedef void* (*pfun)(**int, *float);
instead. * before void does not make any sense.
typedef void* (*pfun)(**int, *float);
instead. * before void does not make any sense.
Anand said:
1 decade ago
typedef void* (*pfun)(int**,float**); === >> correct !.
typedef *void (*pfun)(**int, *float); === >> wrong ! the asterisk is in wrong place :P.
This is the correct answer.
typedef *void (*pfun)(**int, *float); === >> wrong ! the asterisk is in wrong place :P.
This is the correct answer.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers