You can prepare effectively for Computer Science Engineering (CSE) GATE Computer Science Engineering(CSE) 2027 Mock Test Series with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Syntax Directed Translation- 1 ". These 20 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
To evaluate an expression without any embedded function calls
Detailed Solution: Question 1
Consider the expression tree shown. Each leaf represents a numerical value, which can either be 0 or 1. Over all possible choices of the values at the leaves, the maximum possible value of the expression represented by the tree is ___.
Detailed Solution: Question 2
Which one of the following grammars is free from left recursion?
Detailed Solution: Question 3
The number of possible min-heaps containing each value from {1, 2, 3, 4, 5, 6, 7} exactly once is _______.
Detailed Solution: Question 4
Which of the following features cannot be captured by context-free grammars?
Detailed Solution: Question 5
Consider a grammar with the following productions
The above grammar is:
Detailed Solution: Question 6
The grammar whose productions are
-> if id then <stmt>
-> if id then <stmt> else <stmt>
-> id := id
is ambiguous because
Detailed Solution: Question 7
In the following grammar
Which of the following is true?
Detailed Solution: Question 8
A grammar that is both left and right recursive for a non-terminal, is:
Detailed Solution: Question 9
Given the following expression grammar:
Which of the following is true?
Detailed Solution: Question 10
Detailed Solution: Question 11
Consider the grammar shown below
S → i E t S S’ | a
S’ → e S | ε
E → b
In the predictive parse table, M, of this grammar, the entries M[S’ , e] and M[S’ , $] respectively are
Detailed Solution: Question 12
Consider the translation scheme shown below.
Here num is a token that represents an integer and num.val represents the corresponding integer value. For an input string ‘9 + 5 + 2’, this translation scheme will print
Detailed Solution: Question 13
Consider the grammar with the following translation rules and E as the start symbol
Compute E.value for the root of the parse tree for the expression:2 # 3 & 5 # 6 & 4
Detailed Solution: Question 14
Which of the following grammar rules violate the requirements of an operator grammar? P, Q, R are nonterminals, and r, s, t are terminals.
Detailed Solution: Question 15
Consider the following grammar G:
Let Na(ω) and Nb(ω) denote the number of a’s and b’s in a string ω respectively.
Detailed Solution: Question 16
Consider the grammar:
For a sentence
, the handles in the right-sentential form of the reduction are:
Detailed Solution: Question 17
Consider the following statements about the context free grammar
I. G is ambiguous
II. G produces all strings with equal number of a's and b's
III. G can be accepted by a deterministic PDA
Which combination below expresses all the true statements about ?
Detailed Solution: Question 18
Which one of the following grammars generates the language
Detailed Solution: Question 19
Consider the grammar with non-terminals N= {S,C,S1} terminals T = {a,b,i,t,e} with S as the start symbol, and the following set of rules:
The grammar is NOT LL(1) because:
Detailed Solution: Question 20