In C Write down the output of the following include using na

In C++, Write down the output of the following

#include <iostream>

using namespace std;

int toMultiply(int);

int toSum(int,int);

int main(){

int result;

result = toSum( toMultiply(toMultiply(10)), toMultiply(10));

cout << result << endl;

return 0;

}

int toMultiply(int input){

      int output = input*input;

      return output;

}

int toSum(int a, int b){

      return (a+b);

}

Solution

#include <iostream.h>

int toMultiply(int);

int toSum(int,int);

int main(){

int result;

result = toSum( toMultiply(toMultiply(10)), toMultiply(10));

cout << result << endl;

return 0;

}

int toMultiply(int input){

      int output = input*input;

      return output;

}

int toSum(int a, int b){

      return (a+b);

}

OUTPUT:10100

I had done the program in TURBO C++

In C++, Write down the output of the following #include <iostream> using namespace std; int toMultiply(int); int toSum(int,int); int main(){ int result; r
In C++, Write down the output of the following #include <iostream> using namespace std; int toMultiply(int); int toSum(int,int); int main(){ int result; r

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site