158k views
2 votes
3. The ifstatement:

if(13<12)
printf("never\\");
else
printf("always\\");

A. displays never
B. displays always
C. will not compile since 13 is not less than 12
D. causes a run-time error since 13 is not less than 12
E. displays nothing since 13 is not less than 12

User Loki L
by
7.8k points

1 Answer

7 votes

Answer:

Hi!

The correct answer is B.

Step-by-step explanation:

The if statement will compare 13<12. This will return false.

In addition, you have an else clause, so:

If comparison is true then run the code in the if statement.

If comparison is false then run the code in the else statement

Step by step.

First, the code will compare 13<12 -> false;

Second: if(false) -> run the else statement.

Third: printf("always\\");