Q&A Discussies
About default arguments
5 Stemmen
4 AntwoordenHow do i create a function in C?
0 Stemmen
6 AntwoordenDef Quiz
1 Stem
6 AntwoordenWhat is the difference between?
0 Stemmen
6 Antwoordendefault arguement ?
0 Stemmen
2 AntwoordenPython: return functions
2 Stemmen
3 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 AntwoordenIntro to Functional Programming
0 Stemmen
6 AntwoordenPython function
1 Stem
2 Antwoordenwhat is arguments?
1 Stem
2 AntwoordenЗначения по умолчанию для параметров
-2 Stemmen
8 Antwoordencommand line aregumente
0 Stemmen
3 AntwoordenWhere does the return value go?
0 Stemmen
4 Antwoordenmap function
1 Stem
4 AntwoordenParseInt(readline(),18)
0 Stemmen
3 AntwoordenPython functions
1 Stem
7 AntwoordenFunctions
0 Stemmen
3 AntwoordenExplain this code.
0 Stemmen
4 AntwoordenPopulair vandaag
Coding for Cybersecurity
0 Votes
Pointers in c#
0 Votes
Salut tout le monde
1 Votes
How can i isntall modules
0 Votes