0

1st = 60, 2dd= 26, 1st assignment value where is about?? Please help me.

#include <iostream> using namespace std; int sum(int a=4, int b=2) { int result = a + b; return (result); } int main() { int x = 24; int y = 36; //calling the function with both parameters int result = sum(y,x); cout << result << endl; //calling the function without b result = sum(x); cout << result << endl; return 0; }

23rd Mar 2017, 4:09 PM
Zahid Mahmood
Zahid Mahmood - avatar
1 Answer
0
"sum" is not a function,you should write sum()
24th Mar 2017, 4:58 AM
Alex_D
Alex_D - avatar