F&A Diskussionen
Reminder 14 quotient 48 =?
-4 Stimmen
10 AntwortenHow is it come the result 48
5 Stimmen
13 Antworten#include <iostream>
using namespace std;
int sum(int a, int b=42) {
int result = a + b;
return (result);
}
int main() {
int x = 24;
int y = 36;
//calling the function with both parameters
int result = sum(x, y);
cout << result << endl;
//calling the function without b
result = sum(x);
cout << result << endl;
return 0;
}
why is da last function cout 66 and not 48 isn't it suppose to add 24+24?
1 Stimme
6 AntwortenHeute heiß
Activities on sololearn
5 Votes
Html issue
2 Votes
Can you help me ?
1 Votes
Code coach
1 Votes
How I can use div
1 Votes
App development 🔥☝️
1 Votes
What am I doing wring?
1 Votes
Computer architecture
1 Votes
Playground input
1 Votes