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
What is extern storage class in c?
What is static and volatile in c?
Why doesnt long int work?
When the macros gets expanded?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
What is wrong in this statement?
Explain what is the benefit of using enum to declare a constant?
When we use void main and int main?
What is the difference between memcpy and memmove?
How can I call fortran?
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 a class c rental property?
What are the different types of control structures in programming?
Is null equal to 0 in sql?
What is a char in c?