# Difference between Funtion to pointer and pointer to function

• Oct 13th, 2005

it is just as saying pointer to an integer or integer to pointer

#### sujit mahapatro

• May 9th, 2006

hi

just go thru the two examples written below, to clarify this doubt

ex of pointer to function:

int (*function name)(Argument1,Argument2..)

The above decleration explains that its an pointer to a function whose return type is an intiger.

ex of function to pointer  :

int *function name(Argument1,Argument2..)

The above declaration expalains that a function teturns a pointer to an intiger quantity.

• Dec 6th, 2006

hi

please find the difference between function to pointer and pointer to function

function to pointer means return value of the function is a pointer

where as pointer to function ->holding  the address the function

Regards

#### Ajay Kanse Profile Answers by Ajay Kanse Questions by Ajay Kanse

• Dec 22nd, 2008

Both are same. There is lot of confusion around this but function point and pointer to function are same.

#### rocking.piyush Profile Answers by rocking.piyush

• Feb 23rd, 2011

That are not same.

Function to a pointer means the return value of the function is a pointer

Ex:-

int *func (int x,int y)

Whereas pointer to a function is the declaration of pointer that holds the base address of the function.

Ex:-

int (*func) (int x,int y)