Complete the code to check if a number is positive.
if (num [1] 0) { printf("Positive\n"); }
The condition num > 0 checks if the number is positive.
Complete the code to print "Even" if the number is even.
if (num % 2 [1] 0) { printf("Even\n"); }
The condition num % 2 == 0 checks if the number is even.
Fix the error in the if statement to check if a number is negative.
if (num [1] 0) { printf("Negative\n"); }
The condition num < 0 correctly checks if the number is negative.
Fill both blanks to complete the if-else statement that prints if a number is positive or not.
if (num [1] 0) { printf("Positive\n"); } else { printf("[2]\n"); }
The condition num > 0 checks positivity, else it prints "Negative".
Fill all three blanks to complete the if-else if-else statement that checks if a number is positive, zero, or negative.
if (num [1] 0) { printf("Positive\n"); } else if (num [2] 0) { printf("Zero\n"); } else { printf("[3]\n"); }
The first condition checks if num > 0, second if num == 0, else prints "Negative".
