h> int* larger(int*, int*); void main() { int a = 15; int b = 92; int *p; p = larger(&a, &b); printf("%d is larger",*p); } int* larger(int *x, int *y) { if(*x > *y) return x; else return y; } type (*pointer-name)(parameter);
You can use pointers to call functions and send functions to other functions as arguments. On pointers to functions, you can't do pointer arithmetic.
When giving arguments to a function, the call by pointer method converts the address of an argument into the formal parameter. The address is utilised within the function to obtain the actual parameter used in the call. Changes to the parameter have an impact on the passed argument.
Like conventional pointers, function pointers point to code. The name of the function can be used to get the address of the function in Functions Pointers. A function can also be returned from a function and supplied as an argument.
We shall not allocate or deallocate memory since it is used to execute a block of code.
Learner's Ratings
4.4
Overall Rating
69%
18%
5%
4%
4%
Reviews
P
Pradeep Kumar Maurya
5
the world best course
M
Manmohan Surajlal Agade
5
good
A
Aakash Kumar
5
nice teacher
A
Ashlesh Satpute
5
Nice
S
SATYAM
5
this is a awosome course every boudy do it
B
Balaji Bhokare
5
nice
A
Ashish Arjun Gaikwad
5
Absolutely!!!and very easy to understand
Kolhapuri bhashet lay bhari...
Share a personalized message with your friends.