
Ultimate access to all questions.
Answer-first summary for fast verification
Answer: Only II and III.
## Explanation Let's analyze each statement: **I. A variable declaration associates a name with a value that generally cannot be changed during program execution.** - This statement is **incorrect**. Variable declarations typically associate a name with a value that **can** be changed during program execution (unless it's a constant). Variables are mutable by definition in most programming languages. **II. Arithmetic expressions are expressions whose results are numeric values, integer or fractional.** - This statement is **correct**. Arithmetic expressions (like `2 + 3`, `5 * 4`, `10 / 2`) indeed produce numeric results, which can be integers or floating-point numbers. **III. Logical expressions are those that result in one of two values, true or false.** - This statement is **correct**. Logical expressions (like `x > 5`, `a == b`, `p && q`) evaluate to boolean values: true or false. **Conclusion:** Only statements II and III are correct, so the correct answer is **D) Only II and III.**
Author: Danyel Barboza
No comments yet.
Consider the statements below about commands in programming languages:
I. A variable declaration associates a name with a value that generally cannot be changed during program execution. II. Arithmetic expressions are expressions whose results are numeric values, integer or fractional. III. Logical expressions are those that result in one of two values, true or false.
Which are correct?
A
Only I.
B
Only II.
C
Only III.
D
Only II and III.
E
I, II and III.