Define function pointers?



Define function pointers?..

Answer / 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

More C Interview Questions

Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

0 Answers  


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

0 Answers  


Differentiate between functions getch() and getche().

0 Answers  


What is a example of a variable?

0 Answers  


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

0 Answers  


what is volatile in c language?

9 Answers   Cap Gemini, HCL, Honeywell, TCS, Tech Mahindra,


Do character constants represent numerical values?

0 Answers  


write a c program to find the roots of a quadratic equation ax2 + bx + c = 0

11 Answers   CSC, St Marys, TATA,


What are the __date__ and __time__ preprocessor commands?

0 Answers  


int a[3][5]={ {1,2,3,4,5],{2,3,4,5,6},{10,11,12,13,14}}; int *p=&a; printf(“%d”,*(*(x+1)+3));

2 Answers   Wipro,


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

0 Answers  


main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(“%d”,x); }

8 Answers   Vector,


Categories