- A x is greater than 10
- B x is less than or equal to 10
- C The code will result in a runtime error
- D The code will result in a compile error
- Share this MCQ
Answer:
B
Share this MCQ
Answer: B
Explanation: The if
statement checks if x
is greater than 10, which it is not. Therefore, the code inside the else
block is executed, resulting in the output "x is less than or equal to 10".
Share this MCQ