CD Question Bank
CD Question Bank
CD Question Bank
QUESTION BANK
Sr.
QUESTIONS
No
1 Explain input, output and action performed by each phases of compiler with example.
(Winter-2022) -7 Marks
What is Input Buffering? Why it is used? (Summer-2022 ) -4 Marks
2
Write a brief note on input buffering techniques. (Winter-2019) 4 marks
3 Explain the language dependent and machine independent phases of compiler. Also List major
functions done by compiler. (Summer-2022) -7 Marks
4 List out phases of a compiler. Write a brief note on Lexical Analyzer
What is lexical analysis? Which are the tasks performed by lexical analyzer.( Winter 2022) – 3Marks
5 Explain activation record in detail. (Summer-2022) 7Marks
6 What are conflicts in LR Parser? What are their types? Explain with an example.
(summer- 2022) - 7 marks
7 Draw the DFA for the regular expression (a|b)*abb using set construction method only.
(Winter-2021) 7 Marks
8 1. ) Compare: Static v/s Dynamic Memory Allocation. (Winter 2021,winter 2020) 4 Marks
9 Translate the following expression into quadruple, triple, and indirect triple: -(a+b)*(c+d)-(a+b+c)
(Summer-2022) 7 marks
10 Consider the following grammar:
S’ = S#
S -> ABC
A -> a|bbD
B -> a| Ꜫ
C -> b| Ꜫ
D -> c| Ꜫ
Construct FIRST and FOLLOW for the grammar also design LL(1)
parsing table for the grammar
(Summer 2022) - 7 Marks
11 For the following production write the semantic action:
1. S -> E$
2. E -> E1 + E2
3. E -> E1 * E2
4. E - > digit
Summer-2022 -4Marks
12 Construct SLR parsing table for the following grammar :
S → (L) | a
L→ L,S | S
(Winter-2022) -7marks.
13 Compare: Static v/s Dynamic Memory Allocation. (Winter-2022,winter 2019) -3 marks
25 What is DAG? What are its advantages in context of optimization? How does it help in eliminating
common sub expression? (Summer-2022) -7 Marks
26 Explain the following with example
1) Lexical phase error
2) Syntactic phase error (Summer -2022) -4marks