what is the advantage of function pointer
Answer Posted / dwight schrute
suppose u have 2 files:
file1 has following functions:
A1
B1
C1
file12 has following functions:
A2
B2
C2
scenario:
A1 needs to use A2 in turn A2 needs to use B1.
A1 invokes A2;
A2 invokes B1;
for B1 to be available in file2 either shld be extern or in
header file which in turn exposes it to entire file2.
In order to minimize this exposure "pass B1 as a functional
pointer to A2".
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Do array subscripts always start with zero?
What is .obj file in c?
Is there any demerits of using pointer?
What is structure pointer in c?
What is the size of structure pointer in c?
What is the value of c?
What is c preprocessor mean?
How do you write a program which produces its own source code as output?
How to find a missed value, if you want to store 100 values in a 99 sized array?
What is an array? What the different types of arrays in c?
Difference between linking and loading?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
Which is better oop or procedural?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What does the characters “r” and “w” mean when writing programs that will make use of files?