Dyskusje Q&A
About default arguments
5 głosów
4 odpowiedziDef Quiz
1 Głos
6 odpowiedzidefault arguement ?
0 głosów
2 odpowiedziPython: return functions
2 głosów
3 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 odpowiedziPython function
1 Głos
2 odpowiedziwhat is arguments?
1 Głos
2 odpowiedzicommand line aregumente
0 głosów
3 odpowiedzimap function
1 Głos
4 odpowiedziParseInt(readline(),18)
0 głosów
3 odpowiedziPython functions
1 Głos
7 odpowiedziFunctions
0 głosów
3 odpowiedziExplain this code.
0 głosów
4 odpowiedziPopularne dzisiaj
Ошибка в приложении Sololearn
1 Votes
NEO V2.0
1 Votes
Hello guys,
1 Votes
Sololearn course
1 Votes
Payment by account
0 Votes
Python
0 Votes