Dyskusje Q&A
How to develop a game
-2 głosów
4 odpowiedzi#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 Głos
6 odpowiedziPopularne dzisiaj
Question
3 Votes
overloading operators << >>
1 Votes
Wayss
0 Votes
I dont now that how to do js
2 Votes
fully dynamic arrays
1 Votes
Wishkit alternative for android
1 Votes
How to start in web dev?
0 Votes
Hi
0 Votes