GATE CS 2021 : Compiler Design Rapid Mini Mock (App update required to attempt this test)
Attempt now to get your rank among 680 students!
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 ?
a = (b+c)*(b+c)
How many tokens are identified by lexical phase while scanning the above code?
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.
I) shift s ii) reduce A->ß iii) Accept iv) reject
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 ?
((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
- 680 attempts
- 7 upvotes
- 2 comments