Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you initialize function pointers? Give an example?

Answer Posted / vadivel t

Initialisation can be done in the following way.

func(int a,int b);
*pfunc(int a, int b);
main()
{

/*here the starting address of the function can be assigned
to a function pointer of the same type*/
pfunc = func;
....
....
....
}
func(int a, int b)
{
....
....
....
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the difference between functions getch() and getche()?

986


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2018


What is a good data structure to use for storing lines of text?

1032


how we can make 3d venturing graphics on outer interface

4727


What is calloc malloc realloc in c?

1008


What are the 32 keywords in c?

1040


Explain the difference between call by value and call by reference in c language?

1050


What is abstract data structure in c?

970


What are qualifiers and modifiers c?

937


Explain enumerated types in c language?

989


What does 3 mean in texting?

1026


Which is best book for data structures in c?

1038


What are the applications of c language?

1009


What is void pointers in c?

955


Between macros and functions,which is better to use and why?

2111