Consider the conditional statement if (m == 20 − 10 || n > 10). The order of execution of the following operations is
A. ==
B. −
C. ||
D. >
Choose the correct answer from the options given below:
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. B, D, A, C
Explanation
Precedence in C: arithmetic (−) is highest, then relational (>), then equality (==), then logical OR (||). So 20 − 10 is computed first, then n > 10, then m == 10, and finally ||: B, D, A, C.More Programming Languages and Computer Graphics questions
- Which of the following is NOT true about Global Variables?
- Arrange the 2-D viewing transformation pipeline. A. Convert world coordinates to viewing coordinates B. Map viewing coordinates to normaliz…
- The entire set of parameters, including the return address, that is stored for a procedure invocation is referred to as
- Consider the following statements:int x = 10, y = 15; x = ((x == y) ? (y + x) : (y - x)); What will be the value of x after executing these…
- The major adverse side effects of scan conversion are: A. Staircase appearance B. Unequal brightness of slanted lines C. Picket fence probl…
- Match List I (Functions) with List II (Uses of functions)List I List II A. fseek() I. Gives the current position in the file B. ftell() II.…