in Programming in C edited by
429 views
0 votes
0 votes

https://gateoverflow.in/1343/gate2005-1-isro2017-55

HERE IN THIS QUESTION FOR 4TH OPTION WHAT IS CORRECT DECLARATION ...I AM NOT GETTING FURTHER FROM       

                f(int *)  i m not getting its return part .........................

and how to read  (*) f(int*)

in Programming in C edited by
by
429 views

8 Comments

didn't you check the comments?
0
0

I READ THE COMMENTS OF saurabh rai BUT THEY WERE RETURNING INTEGER POINTER FOR D PART QUESTION ASK FUNCTION POINTER ...........ARE THEY SAME??

0
0

int (*f) (int *) --  it returns int. value.

int * fu(int *) --  it returns returns address of an integer.

int function(int* x)
{
    // ...
    return SOME_VALUE;
}
then we can use:: int (*f) (int *) = &function;

Just check this :: https://stackoverflow.com/questions/32156290/what-does-int-fint-represent

 

0
0

read the VS comment, below saurabh rai comment

0
0

1.  declaration for D ("A function that takes an integer pointer as argument and returns a function pointer") 
int ( * f(int *) ) ()

here f returns a pointer pointing to a function which returns int data and takes no input as arguments

SO IN THIS out most int is due to becz implict return type is n???

0
0
they didn't clearly mention the return type of function pointer, therefore we can assume anything, for easy convinient they take int.
0
0
ohk thank u so much  just for easy convenient not default case??
0
0
yes, it is not default
0
0

Please log in or register to answer this question.

Related questions