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
Explain pointers in c programming?
Is using exit() the same as using return?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is 'bus error'?
What does stand for?
Can you write the function prototype, definition and mention the other requirements.
What is spaghetti programming?
What is sizeof array?
How can I find out the size of a file, prior to reading it in?
What functions are used for dynamic memory allocation in c language?
how is the examination pattern?
What is an arrays?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555