GATE CS 2018 (Forenoon) — Question 48

Compiler DesignLexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)MCQ2 marks · −2/3 if wrongMedium

Consider the following parse tree for the expression a#b\(c\)d#e#f, involving two binary operators $ and #. [IMAGE_Q_48] Which one of the following is correct for the given parse tree?
  1. A
    $ has higher precedence and is left associative; # is right associative
  2. B
    # has higher precedence and is left associative; $ is right associative
  3. C
    $ has higher precedence and is left associative; # is left associative
  4. D
    # has higher precedence and is right associative; $ is left associative
Practise the full 2018-FN paper
Challenge a friend: WhatsApp Telegram
From RENYXERAFree All-India Mock — every SundayA full GATE CS paper, exactly 180 minutes, ranked across India with your GATE score.
Practise more on Lexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group