+ 7

Please expalin what will be the output of this code and how?

You can visit my profile for the screenshot. https://www.sololearn.com/post/168787/?ref=app

3rd Nov 2019, 2:39 AM
Shreyansh
Shreyansh - avatar
3 Antworten
+ 6
This code is using ternary operator so question statement can be interpreted as What is the output of this code? int x=8, m=6, y; if(x*2<m+4) //False y=4*m; else y=8*m; //y=8*6 cout << y; //48 Hence the output will be 48
3rd Nov 2019, 2:51 AM
Arsenic
Arsenic - avatar
3rd Nov 2019, 2:44 AM
Shreyansh
Shreyansh - avatar
+ 3
https://www.sololearn.com/post/168787/?ref=app Shreyansh try to put the code link in discription section so that everyone can access it
3rd Nov 2019, 2:41 AM
Arsenic
Arsenic - avatar