+ 4
I think the output of the code is 19. But There is no 19 in the possible answers. Is there any trick?
int Sum(int a=3, int b =8) {return a+b;} int main(){ int b=11; cout<< Sum(b); }
5 ответов
+ 1
There is no trick the answer is 19.
+ 1
Abhay no, variable names have nothin to do with that.
+ 1
Mustafa K. thks for correcting me
0
Yes Sir! I see!
0
Yes , the output of this code is 19, because Sum has 2arguments , when you gave 1st argument b=11, you dont write second argument , so second argument of Sum function became b=8 , because you get
return 11+8;
-->11+8=19<---