Q&A Discussions
Operator % what is it
0 Votes
4 Answers#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 Vote
6 AnswersStop code execution?
2 Votes
1 AnswerThe above qns ans
0 Votes
1 AnswerCapital indexes
0 Votes
2 AnswersWhat is meant by $x=$y ?
0 Votes
1 AnswerQuestion about "return"
0 Votes
1 AnswerHot today
GUI-Based Python code in Webpage
3 Votes
Convert Animated SVG to PNG
1 Votes
My Missing Courses
1 Votes
Are '\0' and NULL the same?
1 Votes
Number addition
0 Votes
cyber security
0 Votes