Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuiteDiscussions Q&R
#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 RéponsesAujourd'hui en vedette
What's the error in this code?
0 Votes
How to find image links
0 Votes
Vote
1 Votes
I don’t know why but python seems to be harder than java to me does any body else fell like this?
0 Votes
What's wrong with my code?
0 Votes
Help Me!!!
1 Votes
TIMER
0 Votes