Compiler Design — DU B.Sc. (Hons) Computer Science Previous Year Question Papers

Programme
B.Sc. (Hons) Computer Science
Paper type
DSE
Paper code
2343010025
Exam years
2022–2025

Compiler Design is a DSE paper in Semester VII of B.Sc. (Hons) Computer Science at Delhi University (paper code 2343010025). 2 previous year question papers from 2022–2025 are listed below; view or download each original PDF.

Share with your class: WhatsApp Telegram

2025 question papers

2025

B.Sc. (Hons) Computer Science

2343010025

2022 question papers

2022

B.Sc. (Hons) Computer Science

2343010025

What was asked in the 2025 Compiler Design paper?

Text of the nov dec 2025 DU question paper (UPC 2343010025), so you can see what gets asked before opening a PDF.

Compiler Design B.Sc. (H) Computer Science (DSE) 4. All parts of a question must be answered together. 5. Make and state necessary assumptions wherever applicable. 1 (a) Describe how token, pattern and lexeme differ and illustrate the distinction with the 4 help of suitable example. (b) Determine the cost of the following instruction sequences: (c) Consider the following grammar: Is the above grammar ambiguous? Justify your answer. (d) (e) Draw the transition diagram for the following patterns: Explain the peephole optimization techniques using suitable example. 4 (f) Consider the following context-free grammar: 4 Compute the FOLLOW set for each non-terminal in the set. (g) Suppose that we have a production s → ABC. Each of the four nonterminals S, 4 A, Band C have two attributes: s is a synthesized attribute, and i is an inherited attribute. For each of the sets of rules below, tell whether the rule is S-attributed or L-attributed, Justify your answer. (h) Differentiate between static and dynamic storage allocation. 2 2 (a) Consider the following grammar: Compute the canonical set of LR (O) items for the above grammar. Also, build the SLR parsing table for the grammar. Using the parsing table check whether the grammar is SLR or not? Justify your answer. (b) Compare and contrast lexical, syntactic, semantic and logical errors with suitable 6 3 (a) List the various phases of compiler with suitable example. 9 (b) Describe the language denoted by the following regular expressions: 6 4 (a) Consider the context-free grammar: Construct the predictive parsing table. Check whether the given grammar is LL(1) or not. Justify your answer. (b) Consider the following code snippet of bubble sort: 6 return; for (int i=0; i<n-l; it+) Il print the sorted array : Draw the activation tree to sort the array. (a) Differentiate between synthesized and inherited attribute with the help of suitable 4 (b) Translate the following code statement into three-address code: 5 (c) Construct the annotated parse tree for the string 8 + 3 * 5 using the following 6 Syntax Directed Definition (SDD): L → E IL.val =E.val 1 E → E1 + T {E.val =E1.val + T.val} E → T {E.val = T.val) T → T1 * F {T.val = T1. val × F.val} T → F {T.val=F.val} F → (E) {F.val =E.val} F → digit {F.val = digit.lexval } (a) Generate code for the following three-address statements assuming a and b'are arrays whose elements are 8-byte values: (b) Consider the following SLR parsing table below: Check whether the input string albb can be accepted or not for the following grammar. Show the stack contents, input buffer and action at each step. 7 (a) (C) Define input buffering in compiler design. Why is it necessary during lexical 3 Construct the syntax tree and DAG for following expression: (b) Define left recursion. Consider the following grammar: Eliminate left recursion in the above grammar. (c) Consider the following expression: =a + (b * c) / (d - e)

How can I prepare for Compiler Design?

Related subjects in B.Sc. (Hons) Computer Science

Frequently asked questions

Where can I download the DU Compiler Design previous year question paper PDF?
This page lists 2 Compiler Design question papers for B.Sc. (Hons) Computer Science at Delhi University (2022–2025). Open any paper to view the original PDF or download it. It is free and needs no login.
Which years of Compiler Design question papers are available?
Compiler Design papers are available for 2025, 2022.
What is the paper code (UPC) of Compiler Design?
The Unique Paper Code for Compiler Design in B.Sc. (Hons) Computer Science is 2343010025.
Which semester is Compiler Design taught in?
Compiler Design is a DSE paper in Semester VII of B.Sc. (Hons) Computer Science, according to DU's published scheme.

← All B.Sc. (Hons) Computer Science subjects