How do you initialize function pointers? Give an example?
Answer Posted / preeti singh
for e.g. if we have to declare a pointer to a function , the
signature of which is :
int add(int a,int b)
then a pointer to the above function can be declared as:
int (*myptr)(int ,int);
here myptr is a pointer which can point to any function that
takes 2 int args and returns an int value.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the difference between the = symbol and == symbol?
What are the application of void data type in c?
How do I round numbers?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
How to delete a node from linked list w/o using collectons?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
How main function is called in c?
how to introdu5ce my self in serco
What are linker error?
What is adt in c programming?
What does sizeof int return?
Whats s or c mean?
What is scanf_s in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
What are pointers? What are stacks and queues?