Read n and classify it as Positive, Negative, or Zero.
You read one integer and classify it: greater than zero, less than zero, or exactly zero. Three labels, one winner. This is the most common three-way if in beginner C.
-3
>, then <
n < 0
Negative
Each step highlights the matching C line. Program output appears only when a line that prints actually runs.
Five questions. Pick one answer each, then Check answers. The correct choice turns green.
1. Input -3 prints:
else if (n < 0).
2. The Zero branch runs when:
Final else.
3. Order of tests should be:
No overlap.
4. scanf reads into n with:
Address.
5. else if is skipped when:
First true wins.