What is function pointer and where we will use it

Answer Posted / bsreddi

A function pointer is a type of pointer in C, C++ and other
C-like programming languages. When dereferenced, a function
pointer invokes a function, passing it zero or more
arguments just like a normal function. In programming
languages like C, function pointers can be used to simplify
code, such as replacing large switch statements.

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi, which software companys will take,if d candidate's % is jst 55%?

1897


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

2107


What is #include stdlib h?

895


Can we declare variables anywhere in c?

801


What is null character in c?

918


What is the 'named constructor idiom'?

867


Tell me can the size of an array be declared at runtime?

832


Explain what is the general form of a c program?

852


What are multibyte characters?

892


what is the significance of static storage class specifier?

1956


can we have joblib in a proc ?

1978


Explain what is a 'locale'?

831


There seem to be a few missing operators ..

840


Ow can I insert or delete a line (or record) in the middle of a file?

822


What is the purpose of 'register' keyword?

914