题目内容

What is the value of the result variable after the following if-else chain?-CODE---int num = 5;int result = 0;if (num > 100)result = 1;else if (num == 3)result = 2;else if (num < 20)result = 3;elseresult = 4;-CODE---

A. 1
B. 2
C. 3
D. 4
E. 0

查看答案
更多问题

C will regard the expression as TRUE if the value of the expression is ( ).

A. 0
B. non-0

Determine whether the following syntax of the if statement is correct.-- CODE ----if (expression);statement;-- CODE ----

A. 对
B. 错

The statement following the “if (expression)” is only executed if the “expression” is 0.-- CODE ----if (expression)statement;-- CODE ----

A. 对
B. 错

A compound statement can be used anywhere in a C program in place of a single statement.

A. 对
B. 错

答案查题题库