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

what is a function pointer and how all to declare ,define
and implement it ???

Answer Posted / mathiyazhagan

A function can itself stored in a memory address.By calling
the address ,instead of function name,we can invoke
function.
Eg.:
#include <stdio.h>
void sum(int,int);
{
void (*fp)(); //() denotes pointer to a function
fp=sum(); // no need & .reason : same of array
fp(10,20); //invoking function
}
void sum(int x,int y)
{
printf("sum of x%d and %d is =%d",x,y,x+y);
}

Is This Answer Correct ?    1 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Throw some light on the splay trees?

1058


Hi can anyone tell what is a start up code?

2061


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3683


What is multidimensional arrays

1120


Why can’t we compare structures?

1265


In which header file is the null macro defined?

1341


A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1240


Why calloc is better than malloc?

1032


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1790


When should structures be passed by values or by references?

1035


how could explain about job profile

1915


What is a stream?

1133


What is 1d array in c?

1083


Explain what is the difference between text files and binary files?

1150


How are strings stored in c?

1009