Professional Documents
Culture Documents
DEPT OF CSE,
CD MID-1
Hi BOMMA, when you submit this form, the owner will be able to see your name and email address.
17D01A0529
2. Does the compiler program translate the whole source code in one step?
(1 Point)
Don't Know
YES
No
a. four types
b. two types
c. five types
d. three types
4. In which parsing, the parser constructs the parse tree from the start symbol and
transforms it into the input symbol.
a. Top-down parsing
b. Bottom-up parsing
d. Both a and b
(1 Point)
a. Top-down parsing
b. Bottom-up parsing
d. Both a and b
a. Lexeme
b. identifier
c. mixer
d. Pattern
(1 Point)
a. Lexeme
b. identifier
c. mixer
d. Pattern
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 2/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
a. Code generation
b. Parser
c. Lexical Analysis
d. Code optimization
(1 Point)
a.Code generation
b. Parser
c. Lexical Analysis
d. Code optimization
a. Semantic Analysis
b. Code Generation
c. Syntax Analysis
d. Code Optimization
(1 Point)
a. Semantic Analysis
b. Code Generation
c. Syntax Analysis
d. Code Optimization
a. Lex
b. Symbol Table
c. Yacc
d. Type Checking
(1 Point)
a. Lex
b. Symbol Table
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 3/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
c. Yacc
d. Type Checking
a. Lexical Analysis
b. Semantic Analysis
c. Code generation
d. Syntax Analysis
(1 Point)
a. Lexical Analysis
b. Semantic Analysis
c. Code generation
d. Syntax Analysis
10. Which graph describes the basic block and successor relationship?
a. DAG
b. Flow graph
c. Hamilton graph
d. Control graph
(1 Point)
a. DAG
b. Flow graph
c. Hamilton graph
d. Control graph
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 4/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
a. Context-free grammar
c. Context-Sensitive grammar
d. All of these
(1 Point)
a .Context-free grammar
c. Context-Sensitive grammar
d. All of these
b) sentinel forms
c) Circular forms
d) None
13. A grammar that produces more than one parse for some sentence is
(1 Point)
a) ambiguous
b) unambiguous
c)Context-Free
d) Terminal parsing
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 5/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
a) yield
c) Both A & B
d) None
15. Why is the code optimizations are carried out on the intermediate code?
(1 Point)
A) Because for optimization information from the front end cannot be used
C) Because for optimization information from data flow analysis cannot be used
D) Because they enhance the portability of the compiler to the other target processor.
17. In a compiler, the data structure responsible for the management of information
about variables and their attributes is
(1 Point)
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 6/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
A) Semantic stack
B) Parser table
c) Symbol table
d) Abstract syntax-tree
18. The lexical analysis for Java needs...........in a necessary and sufficient sense.
(1 Point)
A) Turing machine
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 7/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
20. The programming language given below is written in the programming language
that does not allow nested declarations of functions and allows global variables.
k = 20;
print (n);
main()
M(j + k);
What is the output of the above program if the programming language uses
dynamic scoping and call by name parameter passing mechanism?
(1 Point)
a. 105, 25
b. 105, 115
c. 220, 25
d. 115, 220
S->aS\Sb\a\b
B->Bb\ ∈
S->AC\CB C->aCb\∈
A->aA\a B->bB\b
A->aA\ ∈
B->Bb\ ∈
(1 Point)
S->aS\Sb\a\b
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 8/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
B->Bb\ ∈
S->AC\CB C->aCb\∈
23. Consider the grammar G whose SLR parser has n1 states and LALR parser has n2
states. What is the relation between n1 and n2?
a) n1 = n2
b) n1 < n2
c. n1 > n2
a) n1 = n2
b) n1 < n2
c. n1 > n2
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMTz… 9/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
I T {E.value = T.value}
In the above grammar E is the start symbol. What will be the value of E for the root
parser tree for the expression 2 # 3 & 5 # 6 & 4?
(1 Point)
a. 50
b. 100
c. 200
d. 160
25. For a grammar G, Shift reduce (S-R) conflicts is present in LALR (1) parser, if and
only if
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMT… 10/11
5/31/2021 ST.MARY'S GROUP OF INSTITUTIONS HYDERABAD DEPT OF CSE, III B.TECH CSE CD MID-1
Submit
This content is created by the owner of the form. The data you submit will be sent to the form owner. Microsoft is not
responsible for the privacy or security practices of its customers, including those of this form owner. Never give out your
password.
https://forms.office.com/Pages/ResponsePage.aspx?id=jFYGAhUV_UmQ1Pba0HhFACu-rUWHXCBCo0RPXbccbKtUQkZQQVFXTDA2TlFPRFdMT… 11/11