Discussion :: Complicated Declarations - General Questions (Q.No.10)
|Amit Saxena said: (Jul 28, 2014)|
|The answer is not appropriate as the function is declared as no return type using parenthesis. if the declaration would been void *cmp(); then this answer might be right.
Or else explain the difference between Q10 and Q8 ?
|Elayaraja said: (Dec 10, 2014)|
The above answer is correct because here cmp is function pointer, which is pointing to a function which return nothing (void). Since it's correct.
|Mohd Israr said: (Mar 18, 2015)|
Can you explain us why the answer is not appropriate?
|Natwar said: (Jun 30, 2015)|
|Example for cmp is a pointer to a function which returns void:
void cmp (void)
printf("Example for Function Pointer");
void (*fun_ptr)(void); //Syntax for Function pointer
fun_ptr = cmp;
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.