How do you initialize function pointers? Give an example?
Answer Posted / vadivel t
Initialisation can be done in the following way.
func(int a,int b);
*pfunc(int a, int b);
main()
{
/*here the starting address of the function can be assigned
to a function pointer of the same type*/
pfunc = func;
....
....
....
}
func(int a, int b)
{
....
....
....
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain what is the difference between functions getch() and getche()?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What is a good data structure to use for storing lines of text?
how we can make 3d venturing graphics on outer interface
What is calloc malloc realloc in c?
What are the 32 keywords in c?
Explain the difference between call by value and call by reference in c language?
What is abstract data structure in c?
What are qualifiers and modifiers c?
Explain enumerated types in c language?
What does 3 mean in texting?
Which is best book for data structures in c?
What are the applications of c language?
What is void pointers in c?
Between macros and functions,which is better to use and why?