BSc CSIT (TU) Science Compiler Design and Construction (BSc CSIT, CSC365) Question Paper 2074
This is the official BSc CSIT (TU) (Science stream) Compiler Design and Construction (BSc CSIT, CSC365) question paper for 2074, as set in the regular annual examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Compiler Design and Construction (BSc CSIT, CSC365) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Compiler Design and Construction (BSc CSIT, CSC365) exam or solving previous years' question papers, this 2074 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Explain the different phases of a compiler with a suitable diagram, showing the output of each phase for the statement position = initial + rate * 60.
Construct the LR(1) parsing table for the grammar S -> CC, C -> cC | d and parse the input string cdd.
What is a directed acyclic graph (DAG)? Represent the expression a + a * (b - c) + (b - c) * d using three-address code, quadruples and triples.
Section B: Short Answer Questions
Attempt any EIGHT questions.
Differentiate between a compiler and an interpreter.
Eliminate left recursion and perform left factoring on the grammar A -> Aab | Ac | bd | f.
What is a symbol table? Explain its role in a compiler.
Differentiate between a parse tree and a syntax tree.
What is an ambiguous grammar? Show with an example.
Explain the role of the lexical analyzer in a compiler.
Differentiate between LL(1) and LR parsers.
What are regular expressions? Write a regular expression for identifiers.
Explain the handle and handle pruning in shift-reduce parsing.