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 / preeti singh

for e.g. if we have to declare a pointer to a function , the
signature of which is :
int add(int a,int b)

then a pointer to the above function can be declared as:
int (*myptr)(int ,int);

here myptr is a pointer which can point to any function that
takes 2 int args and returns an int value.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the = symbol and == symbol?

1110


What are the application of void data type in c?

1189


How do I round numbers?

1008


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

2067


How to delete a node from linked list w/o using collectons?

2776


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1223


How main function is called in c?

1122


how to introdu5ce my self in serco

2003


What are linker error?

1088


What is adt in c programming?

1158


What does sizeof int return?

1077


Whats s or c mean?

1023


What is scanf_s in c?

1117


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1091


What are pointers? What are stacks and queues?

1148