0
int x=3; switch(x){case 1: x+=x; case 2: x+=x; case 5: x+=x; default : x+=x}; cout<<x; output?
6 Respostas
+ 3
rkk sir how answer will be 48. here value of x is 3 so there is no case matching so default will print x+=x =3+3=6
cout will print 6
+ 3
rkk yaa!! I ve too seen many people 😅
Human compiler 😂😂 Lol
+ 1
48 :')
+ 1
Aniket Sandhilya that was intentionally.(to make him curious)
He could have just copy and pasted the code in the code playground himself and check the output rather than asking here. (if he don't understand how is the output something then that's another thing)
+ 1
rkk 😂😂😂🤣
0
No offense to anyone.(and a bit Offtopic)
But Namit Jain my stay in SoloLearn has been a funny one especially in this Q/A forum.
I've seen many people just copy pasting some code snippets as question and instead of asking why and how the codes is working, they simply ask what is output?
Weird, right!
Cause it makes me feel like I'm some sort of Compiler or what not.
(Now, some human Compiler would say if you feels like compiler then just don't answer.) 😅