Enter a number to check.
-2
Number=-2
The if statement in C programming is easy.
When user enters -2 then, the test expression (num<0) becomes true. Hence, Number=-2 is displayed in the screen.