Define function pointers?

Answer Posted / preeti singh

A function pointer is a type of pointer that points to a
function, for e.g. a pointer to the function :
int fun(int a,int b)

can be declared as :
int(*myptr)(int a,int b);

here myptr is a type of pointer which can point to any
function which takes two integer arguments and returns int.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

given post order,in order construct the corresponding binary tree

2525


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

873


Why we use stdio h in c?

777


Is it cc or c in a letter?

755


What is difference between function overloading and operator overloading?

853


What is main () in c language?

830


What are inbuilt functions in c?

774


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1491


How can I read a binary data file properly?

824


What is static memory allocation? Explain

805


What are called c variables?

763


What is getche() function?

806


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

894


What are types of preprocessor in c?

801


Explain what is a const pointer?

828