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
Y
Yash Lohiya
5
I am really thanks to learnvern because they give best lectures without any cost sir please. I am really requesting please give us pdf
S
Sonu Kumar
5
teaching is really very awesome.
If assignment would be in the pdf along with lecture. then it would be more benificial.
A
ashish patil
5
Teaching is very best everything is understanding thank you so much 🙏
Share a personalized message with your friends.