answersLogoWhite

0


Best Answer

It isn't a question, sorry.

User Avatar

Wiki User

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Explain pointer to function with example c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

Pointer to pointer in c?

Usable. A prominent example is param argv of function main.


How can you declare a pointer function?

*function();this declares a pointer function!


C program pointers to pointers examples?

Pointer to Pointer is a double pointer, denoted by (**). Pointer stores the address of the variable and pointer to pointer stores the address of a pointer variable and syntax can be given as int **ptr2ptr;


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 function pointer and a pointer to a function?

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;".


Why void is used in c language?

void as function return-type means no return value void as function parameter means no parameter void * as pointer type means generic pointer


What is pointer variable explaine?

If you mean example, then it is argv, which is the second parameter of function main.


Explain the allocation of memory cells when a function is called?

When you call a function, the stack pointer is adjusted to cater for the function's arguments (if any), the caller's return address (mandatory), the function's local variables (if any) and the function's exception handlers (if any).


What is parameters in C plus plus?

In C++, parameters are variables declared in the function's declaration and definition that receive values passed in from the function call. They are used to pass values or data into a function to be used within the function's code. Parameters allow functions to be more flexible and reusable by accepting different inputs without needing to modify the function's code.


Call by reference using pointer in c plus plus?

Example: void foo( MyClass& object ){} // function with call by reference signature MyClass* p = new MyClass(); // instantiate a pointer to MyClass foo( *p ); // call by reference using the pointer


Different types of pointers in c language?

... are usable. void pointer (generic pointer) : a special type of pointer which point to some data of no specific types. void *p; null pointer : a special type of pointer which point nowhere. it is usually used to check if a pointer is pointing to a null or free the pointer during deallocation of memory in dynamic memory allocation; it is define by using the predefine constant NULL int *p=NULL; wild pointer : uninitialized pointer. it hold a garbage value. i.e it is not pointing to any memory location yet. dangling pointer: pointer pointing to a destroyed variable. it usually happen during dynamic memory allocation when the object is destroyed but not free and the pointer is still pointing to the destroy object.


Variables that is a functions or not functions?

Here is an example for a variable, which is a function (function-pointer, actually): int (*myfun)(const char *s); myfun = puts; myfun ("Hello, world");