StreakPeaked· Practice

ExamsGATETechnical

Match the following: (P) Lexical analysis (Q) Top down parsing (R) Semantic analysis (S) Runtime environments (i) Leftmost derivation (ii) Type checking (iii) Regular expressions (iv) Activation records

  1. P ↔ i, Q ↔ ii, R ↔ iv, S ↔ iii
  2. P ↔ iii, Q ↔ i, R ↔ ii, S ↔ iv
  3. P ↔ ii, Q ↔ iii, R ↔ i, S ↔ iv
  4. P ↔ iv, Q ↔ i, R ↔ ii, S ↔ iii

Correct answer: P ↔ iii, Q ↔ i, R ↔ ii, S ↔ iv

Solution

The correct option matches lexical analysis with regular expressions, as it involves tokenizing input based on patterns defined by regular expressions. Top-down parsing is associated with leftmost derivation, which is a method of constructing parse trees. Semantic analysis relates to type checking, ensuring that operations in the code are semantically valid, while runtime environments are linked to activation records, which manage function calls and local variables during execution.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →