Pointer to function, C/C++ Programming

Pointer to function:

int mul(int a, int b, int c)

{

  return a*b*c;

}

void main()

{

  int (*function_pointer)(int, int, int);

  function_pointer = &mul;

  printf("\nThe product of three numbers is:%d", function_pointer(8, 3, 4));

  getch();

}

Output

859_pointer to string.png

Posted Date: 9/29/2012 7:02:21 AM | Location : United States







Related Discussions:- Pointer to function, Assignment Help, Ask Question on Pointer to function, Get Answer, Expert's Help, Pointer to function Discussions

Write discussion on Pointer to function
Your posts are moderated
Related Questions
Read numbers form user and place them in array: Program is to read a group numbers of numbers form user and place them in array type of float and sort them void sort(floa

write a c program that multiplies 3 martices

To develop a web crawler such that when given a base URL, it will traverse the entire web tree and then build an index of keywords and what URL link they appear on.   The web crawl

C Program for REVERSE THE WORD IN STRING #include conio.h> #include stdio.h> #include string.h> void main() {           char a[50],b[25][25],temp;           i

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

- Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles. The user should be able to view all DVD titles in his library, add and d

types of lists

Program to print character array : Write a program to print the character array by using string class functions. void main() {  char line[30];   int i=0;   clrsc

Define the Float Data Type of c Language? The float is used to define floating point numbers. The Floating point numbers are stored in 32 bits with 6 digits of precision. Eg

E v o l u t i o n of Software: In the past stage of programming the software's were developed in Machine language Using binary numbers 1's and 0's.  Later it convert