GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2024 set1

GATE 2024 set1 · CS · MCQ · 2 marks · Compiler Design › Semantic Analysis

GATE 2024 set1 Computer Science and Information Technology question: Consider the following syntax-directed definition (SDD). S DHTU S.val = D.val + H.val +…

Consider the following syntax-directed definition (SDD).

{ }
"M" { }
{ }
"L" { }
{ }
"C" { }
{ }
"K" { }

Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute )?

  1. (A)

    45

  2. (B)

    50

  3. (C)

    55

  4. (D)

    65

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion