CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Conditional Short-Circuit

C++ code walkthrough · Question 8
mediumIf Statements

Code

Read carefully. What does this print?
1#include <iostream>
2using namespace std;
3 
4int main() {
5 int x = 0;
6 if (x != 0 && 10 / x > 1) {
7 cout << "Yes" << endl;
8 } else {
9 cout << "No" << endl;
10 }
11 return 0;
12}

Your answer