GATE CS 2024, set 2 · Question 43 · Compiler Design · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Consider the following expression: x[i] = (p + r) * -s[i] + u/w. The following sequence shows the list of triples representing the given expression, with entries missing for triples (1), (3), and (6).
Which one of the following options fills in the missing entries CORRECTLY ?
| (0) | + | p | r |
|---|---|---|---|
| (1) | |||
| (2) | uminus | (1) | |
| (3) | |||
| (4) | / | u | w |
| (5) | + | (3) | (4) |
| (6) | |||
| (7) | = | (6) | (5) |
- (A) (1) =[ ] s i (3) * (0) (2) (6) [ ]= x i
- (B) (1) [ ]= s i (3) - (0) (2) (6) =[ ] x (5)
- (C) (1) =[ ] s i (3) * (0) (2) (6) [ ]= x (5)
- (D) (1) [ ]= s i (3) - (0) (2) (6) =[ ] x i
Answer
Answer (A)
Answer from the official GATE CS 2024 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes