Roll No. EEEEEEEE [ ] Total No. of Pages : 02
Total No. of Questions : 18
--- Content provided by FirstRanker.com ---
B.Tech.(CSE) (2012 to 2017 E-lll) (Sem.-7,8)B.Tech. (IT)
COMPILER DESIGN
Subject Code : BTCS-913
M.Code : 71905
--- Content provided by FirstRanker.com ---
Time : 3 Hrs. Max. Marks : 60INSTRUCTION TO CANDIDATES :
- SECTION-A is COMPULSORY consisting of TEN questions carrying TWO marks each.
- SECTION-B contains FIVE questions carrying FIVE marks each and students have to attempt any FOUR questions.
- SECTION-C contains THREE questions carrying TEN marks each and students have to attempt any TWO questions.
--- Content provided by FirstRanker.com ---
SECTION-A
Answer briefly :
- Differentiate between stack allocation and static allocation.
- Name two compiler construction tools.
- Define ‘Code Motion’ and ‘Constant Folding’ with examples.
- Define ‘Basic Block’ and write about its significance.
- Write at least two differences between LR (0) parsers, SLR (1) parsers, CLR (1) and LALR Parsers.
- Show that the grammar is ambiguous: S ? Sa S? bS S ? c
- List the functions of a pre-processor.
- How do Self Hosting Compilers work?
- Name 3 forms of output of code generator.
- Write the triple representation of x := y[i].
--- Content provided by FirstRanker.com ---
--- Content provided by FirstRanker.com ---
SECTION-B
- Differentiate between top down and bottom up parsing. Show the steps of a shift reduce parser on input (a,(a,a)) using the following grammar :
--- Content provided by FirstRanker.com ---
S ? (L) | a
L ? L,S | S - Translate the arithmetic expression a * - (b + c ) into
- Postfix notation
- Three-address code
- What is the role of the lexical analyzer? Explain the issues in lexical analysis.
- What is Code Optimization? Describe the principle sources of optimization.
- Explain the various storage allocation strategies applied to activation records.
--- Content provided by FirstRanker.com ---
SECTION-C
- Explain in detail the process of compilation. Illustrate the output of each phase of compilation for the input “a = (b+c) * (b+c) * 2”.
- What is the need of symbol table. Explain various data structures used for its storage.
- Given the CFG G = {S, {S, U, V, W}, {a, b, c, d}, P} with P given as shown below :
S ? UVW
U ? (S) | aSb | d
V ? aV c--- Content provided by FirstRanker.com ---
V ? cW | e- Construct a table-based LL(1) predictive parser for G;
- Give the parsing actions for the input string “(dc)ac”.
--- Content provided by FirstRanker.com ---
NOTE : Disclosure of Identity by writing Mobile No. or Making of passing request on any page of Answer Sheet will lead to UMC against the Student.
--- Content provided by FirstRanker.com ---
This download link is referred from the post: PTU B.Tech Question Papers 2020 March (All Branches)
--- Content provided by FirstRanker.com ---