GATE CS 2021 Set 1 | Question 14

Compiler Design › Runtime Environment · MCQ · 1 mark · Answer: C

  1. Question 14Compiler Designmcq1 mark
    Consider the following statements. : The sequence of procedure calls corresponds to a preorder traversal of the activation tree. : The sequence of procedure returns corresponds to a postorder traversal of the activation tree. Which one of the following options is correct?
    • A.
      is true and is false
    • B.
      is false and is true
    • C.
      is true and is true
      ✓
    • D.
      is false and is false

    Answer: C

    Solution

    In an activation tree, calls happen in preorder (a procedure is entered before its callees) and returns happen in postorder (a procedure returns after all its callees). Both statements are true.

More GATE PYQ on Runtime Environment

All GATE CS Compiler Design PYQ →

Attempt GATE CS 2021 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →