Let us assume the program below runs smoothly, identify all function arguments in each function call in exact order and separate each argument in just a comma:
int getCube(int number){ return number * number * number;}
char getLetter(double n) {if(n>50) {return'0';} return 'X'}
double getThis(int num){return 1.0;}
int main(){
int n1 = 10, n2 = 123;
double vall = 123.45, val2 = 456.234;
cout << getCube(10) << " " << getCube(123) << "\n";
cout << getLetter(val2) << "-" << getLetter(val1);
cout << getLetter(34.23) << "--" << getThis(88);
cout << getThis(val1);
return 0;
}
What is the Answer? :
getCube() - 10, 123
getLetter() - 456.234, 123.45, 34.23
getThis()- 123.45, 88
Comments
Leave a comment