What are function pointers? Provide an example.

Answer Posted / nashiinformaticssolutions

Pointers to functions that allow dynamic invocation of functions. Example:
void (*funPtr)(int) = &printNumber;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is anything faster than c?

782


What is union and structure in c?

870


Why is c called a mid-level programming language?

962


Explain c preprocessor?

875


Where are the auto variables stored?

861


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1856


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

866


What is a rvalue?

960


code for find determinent of amatrix

1741


What are the advantages of using macro in c language?

820


How can I recover the file name given an open stream?

765


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1881


Why & is used in scanf in c?

814


What is table lookup in c?

844


Explain the array representation of a binary tree in C.

950