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
Explain continue keyword in c
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
How can I do graphics in c?
What is the difference between char array and char pointer?
Is c a great language, or what?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What is getche() function?
When should structures be passed by values or by references?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
List some applications of c programming language?
If fflush wont work, what can I use to flush input?
What is array within structure?
Is there any possibility to create customized header file with c programming language?
What is void main ()?
What are the types of unary operators?