+ 1
What is the output of the code?
int x = 8; int y=4; if( x>4 || y<3) cout << x+y; else cout << x*y;
2 Answers
0
1.) First condition is met (x which is 8 is greater than 4)
2.) Second condition is not even evaluated because of logical or ||
3.) Only first if branch is evaluated (output of 8+4 = 12)
+ 3
12