GATE CS 2021 : Compiler Design Rapid Mini Mock (App update required to attempt this test)
Attempt now to get your rank among 730 students!
Question 1
I. Linear List
II. Hash Table
III. Heap Tree
IV. Binary Search Tree
Among the above data structures, which data structure(s) can be used to store the symbol table ?
Question 2
(b+c)*(b+c)
Question 3
x==y&2||z++!=3;
How many tokens are identified by lexical phase while scanning the above code?
Question 4
Question 5
S1- Lexical analysis phase is responsible for eliminating void space character.
S2- Semantic analyzer help in giving error message by giving row number and column number.
Question 6
I) shift s ii) reduce A->ß iii) Accept iv) reject
Question 7
Question 8
S1 : Every regular grammar is LL(1).
S2 : If a grammar is ambiguous then it cannot be parsed by any of the parser.
S3 : If a grammar is left factored , then after removal of left factoring , the grammar becomes LL(1).
S4 : If a grammar is left recursive , then after removal of left recursion , the grammar becomes LL(1).
Which option is correct ?
Question 9
Question 10
Question 11
What is the maximum value that is possible by the following expression tree at the root node such that id in leaf nodes can have only 2 values as 3 or 5?
Question 12
((a+b)-((b+a)*(a-b) ) )+((a-b)*(a+b) )
The letters A through I are used to name the nodes, and are not part of the expression tree. The operator labels of the interior nodes are the +, -, or * adjacent to the nodes. Assume that + and * are commutative operators, although - is not. Construct the expression DAG from this tree, treating + and * as commutative.
Which of the following statements is TRUE(T)/FALSE(F) about which nodes will be combined?
(i) B and C will be combined
(ii) D and H will be combined
(iii) E and C will not be combined
(iv) F and I will not be combined
(v) I and G will not be combined
- 730 attempts
- 7 upvotes
- 2 comments