C++ Function Return Nested Function Calls

Description

C++ Function Return Nested Function Calls

#include <iostream>
#include <cstdlib>

using namespace std;

int myFunc1()/*from   w ww.  j ava 2 s . c  om*/
{
    return 4;
}

int myFunc2()
{
    return 10 * myFunc1();
}

int myFunc3()
{
    return myFunc2() + 25;
}

int main()
{
    cout << myFunc3() << endl;
    return 0;
}



PreviousNext

Related