C Programming - Complicated Declarations - Discussion

5. 

What do the following declaration signify?

int (*pf)();

[A]. pf is a pointer to function.
[B]. pf is a function pointer.
[C]. pf is a pointer to a function which return int
[D]. pf is a function of pointer variable.

Answer: Option C

Explanation:

No answer description available for this question.

Fabio said: (Feb 12, 2011)  
Both A and C are correct.

Kiran said: (Aug 24, 2011)  
Yes both A & C Are correct but C is more detailed one.

Chiru said: (Oct 4, 2011)  
B is correct, syntax for c is int *pf () ;.

Srinivas Reddy R said: (Feb 6, 2013)  
pf is a pointer to a function of type taking nothing and returning integer.

Tinku said: (May 10, 2013)  
What is the use of making a function pointer? Can you please elobrate this by example?

Gracy said: (Nov 11, 2013)  
Can you please find out this program.

Write a C program to find the first n Hardy-Ramanujan numbers.

Shohil said: (Sep 3, 2015)  
It is called functure, which is also called function pointer. Therefore for me B is also correct. If m wrong, kindly intimate.

Sid said: (Jul 6, 2017)  
pf is a function which returns int*.

Pavankalyan said: (Nov 2, 2017)  
int (*pf) ();
Option 'C' is exact answer.
'A' is false.
Because it is int so it return some value so c is exact value.
Suppose they are given void (*pf ) (); that time 'A' option is correct.

Anirban Hazra said: (Aug 30, 2018)  
Option B is correct because here pf is a function pointer pointing to a function of void argument & int return type.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.