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


Please Help Members By Posting Answers For Below Questions

What is extern storage class in c?

612


What is static and volatile in c?

873


Why doesnt long int work?

702


When the macros gets expanded?

920


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.

4658






What is wrong in this statement?

701


Explain what is the benefit of using enum to declare a constant?

696


When we use void main and int main?

673


What is the difference between memcpy and memmove?

686


How can I call fortran?

723


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

767


What is a class c rental property?

735


What are the different types of control structures in programming?

749


Is null equal to 0 in sql?

753


What is a char in c?

644