C Programming - Complicated Declarations - Discussion

Discussion Forum : Complicated Declarations - General Questions (Q.No. 5)
What do the following declaration signify?
int (*pf)();
pf is a pointer to function.
pf is a function pointer.
pf is a pointer to a function which return int
pf is a function of pointer variable.
Answer: Option
No answer description is available. Let's discuss.
10 comments Page 1 of 1.

Anirban Hazra said:   5 years ago
Option B is correct because here pf is a function pointer pointing to a function of void argument & int return type.

Pavankalyan said:   5 years ago
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.

Sid said:   6 years ago
pf is a function which returns int*.

Shohil said:   8 years ago
It is called functure, which is also called function pointer. Therefore for me B is also correct. If m wrong, kindly intimate.

Gracy said:   9 years ago
Can you please find out this program.

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

Tinku said:   10 years ago
What is the use of making a function pointer? Can you please elobrate this by example?

Srinivas reddy r said:   1 decade ago
pf is a pointer to a function of type taking nothing and returning integer.

Chiru said:   1 decade ago
B is correct, syntax for c is int *pf () ;.

Kiran said:   1 decade ago
Yes both A & C Are correct but C is more detailed one.

Fabio said:   1 decade ago
Both A and C are correct.

Post your comments here:

Your comments will be displayed after verification.