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...

why we need function pointers?

Answer Posted / kirankumaryakkala

a pointer that holds the address of a function.
in writing the interrupt service routines(isr),memory virus
programs, etc..
as simply, if u wanna execute one function out of two or
more funcitons( the selection based dynamically)

ex. int add(int a, int b)
int sub(int a, int b)
int mul(int a, int b)

int (*ptr)(int a, int b) //function pointer declaration to
hold a function that takes two integers, returns one integer

here,
ptr= it can assign any function name that is going to execute


Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

while initialization of array why we use a[][2] why not a[2][]...?

2301


Why does everyone say not to use gets?

1024


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2254


What is data structure in c language?

1053


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3912


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2200


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1176


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2043


Explain why can’t constant values be used to define an array’s initial size?

1301


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4620


How can I make it pause before closing the program output window?

989


What is the difference between procedural and functional programming?

1006


What happens if you free a pointer twice?

1024


Explain pointers in c programming?

1060


How pointer is different from array?

1015