Pointer to function, C/C++ Programming

Assignment Help:

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


Related Discussions:- Pointer to function

C program for dynamic data structure(linked list), Aim: To implement a pro...

Aim: To implement a program for dynamic data structure(linked list). Code:                       class node {             int data;             node *next;

Day calculate b/w two dates, Write a function that calculates the number of...

Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? Becareful for the Leap year.

Declaration of variables in cpp, Declaration of Variables: Variables ar...

Declaration of Variables: Variables are declared as follows: int a; float b;   Assigning value to variables: int a = 100; Declaring and assigning is called ini

Super ascii string cost, want the codings for these topic in ur experts min...

want the codings for these topic in ur experts minds.com

Big-m method, big-m method operation reseach in progrmme c++..

big-m method operation reseach in progrmme c++..

Prime no., program to find if a no . is prime or not

program to find if a no . is prime or not

What are the precautions with function overloading, Precautions with functi...

Precautions with function overloading Function overloading is a boon to designers, since dissimilar names for same functions need not be thought of, which often is a cumbersome

#coding, Smugglers are becoming very smart day by day. Now they have develo...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd