what is the advantage of function pointer
Answer Posted / tahir ali
As you probably learned in your first programming courses,
pointers to variables allows you to modify variable contents
from a non-local environment. This gives the flexibility of
writing generic functions which do not alter "known" global
variables, but references to "unknown" variables. Such
functions can be reused. Function pointers gives you the
same flexibility, but at a higher level. Instead of calling
a "known" function, one can call any arbitrary "unknown"
function. This is the main advantage of function pointers:
greater flexibility and better code reuse.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why is c not oop?
code for quick sort?
Tell me what is null pointer in c?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What is a function simple definition?
What is the function of this pointer?
What is difference between main and void main?
How can I recover the file name given an open stream or file descriptor?
What is echo in c programming?
what are non standard function in c
What is the difference between declaring a variable and defining a variable?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
How can I access an I o board directly?