answersLogoWhite

0


Best Answer

A pointer to a function is the memory address that stores the address of a function, while the pointer itself is a function pointer.

A pointer to a function might be defined as "int (*pf)(int, int);", while to actually point to the function, you would use a function pointer, such as "pf = &func;".

User Avatar

Wiki User

โˆ™ 2013-03-14 21:02:14
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between a function pointer and a pointer to a function?
Write your answer...
Submit
Related questions

Give the difference between function and pointer in c?

There is no similarity between the two.


What is the difference between structure and pointer?

difference between pointer or structure


What is the difference bw function pointer and function of pointer?

function pointer is a variable that hold the address of any function which declared in the program but function pointer is the array of the function that accept the run time size of the function.


What is the difference between a structure pointer and a pointer to structure?

Nothing, they are synonyms.


Difference between pointer to constant and constant pointer?

1. pointer to a constant means you can not change what the pointer points to 2. constant pointer means you can not change the pointer.


What is the difference between pointer and array?

Pointer holds an address Array holds values


What difference between a pointer variable and a pointer constant?

The former is variable, the latter is constant.


Difference between function and objective function?

difference between function and objectives?


Difference between genric pointer and normal pointer?

Generic pointer of type 'void *' is compatible with any (data-)pointer, but you cannot use the following operators on it: + - ++ -- += -= * -> []


How can you declare a pointer function?

*function();this declares a pointer function!


What do you mean by function to pointer?

Nothing. You might have meant pointer-to-function.


What is the difference between a reference and a pointer in c?

The difference that i learnt very recently and the one i remember :-)Reference cannot be changed whereas pointer value can be changed.Actually, const pointer = reference.


What is the difference between member function and normal function?

What is the difference between malloc() and calloc()?


Example of fundamental difference between a polynomial function and an exponential function?

fundamental difference between a polynomial function and an exponential function?


What is the difference between void pointers and null pointers?

A void pointer is a pointer that has no type information attached to it.A null pointer is a pointer that points to "nothing". A null pointer can be of any type (void included, of course).


What is the difference between pointers and structure?

A pointer is a variable. A structure is a type.


What is the difference between void pointer 0 and NULL.?

If by 'void pointer 0' you mean '(void *)0', then it is equal to NULL.


What is the difference between value type parameters and reference type parameters?

When a variable is passed by value, the function receives a copy of the variable. When a variable is passed by reference, the function receives a reference, or pointer, to the original data.


Why are double pointers in C used?

pointer is used when we want to retain the change in values between the function calls. Similarly double pointer is used when we want to retain the change in pointers between the function calls. If you want to modify pointers than you need double pointer to retain the change.


What is the difference between a pointer and de-reference pointer?

A pointer is an object that contains the address of another object. A deference'ed pointer is an object. It was a pointer, but its address was used to locate and use that other object as if it was the original target of the instruction.


Can a function return a pointer?

Yes. A function can return a pointer... const char* GetHelloString() { return "Hello!"; } ... returns a pointer to the string "Hello!".


What is the difference between a power point and a white pointer shark?

dfs sd


What is the difference between constituent functions and ministrant function?

Compulsory in nature


Difference between pointer and array?

pointer is use to hold address of another variable whereas array is a collection of elements of similar datatype


What is the difference between array and pointer in C?

--> Array is a collection of same kind of data.--> Pointer is a memory location where the data stored in the memory