1.
- You win!
- Correct
- Ooops!
- Not quite - try again!
- You win! Ooops!
- Not quite - try again!
- This does not generate any output.
- Not quite - try again!
What is the output of the following piece of code, assuming that n is a variable of type int that has the value 1:
if (n) printf("You win!");
else printf("Ooops!");
Hint.
Watch out for little details such as the semicolon at the end of the statement or the parentheses surrounding the condition.