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));




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

Syntax rules for writing constructor functions Its name must be similar as that of the class to which it belongs. It is declared with no return type (not even void). Ho

Project Description: I'm seeking someone who could write me a torrent seeding client which supports multiple proxies. The goal of the project is to make torrents popular by seed

I need vsti program Project Description: Knowledge of vsti programs, and music is a plus, ex: nexus I will input the sounds I just need the interface built Skills required

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

one of the segments is showing compilation error...

Define register with bit fields? We could define register simply with bit fields: struct DISK_REGISTER { unsigned ready:1; unsigned error_occured:1; unsigned disk_spinni