Q&A Discussies
Reminder 14 quotient 48 =?
-4 Stemmen
10 AntwoordenHow is it come the result 48
5 Stemmen
13 Antwoorden#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 Stem
6 AntwoordenPopulair vandaag
Coding for Cybersecurity
1 Votes
Need help
1 Votes
Pointers in c#
1 Votes
Decorators in python.
2 Votes
Please click me
0 Votes
Salut tout le monde
1 Votes
How can i isntall modules
1 Votes