All mock tests are FREE till 31 December — register to save your progress

Consider the conditional statement if (m == 20 − 10 || n > 10). The order of execution of the following operations is: A. == B. − C. || D. >

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. B, D, A, C

Explanation

Arithmetic (−) binds tightest, then relational (>), then equality (==), and logical OR (||) is evaluated last: B, D, A, C.

More Programming Languages and Computer Graphics questions