FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download PTU B.Tech 2020 March CSE-IT 7th and 8th Sem BTCS 913 Compiler Design Question Paper

Download PTU (I.K. Gujral Punjab Technical University Jalandhar (IKGPTU) ) BE/BTech CSE/IT (Computer Science And Engineering/ Information Technology) 2020 March 7th and 8th Sem BTCS 913 Compiler Design Previous Question Paper

This post was last modified on 21 March 2020

PTU B.Tech Question Papers 2020 March (All Branches)


FirstRanker.com

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 : 60

INSTRUCTION TO CANDIDATES :

  1. SECTION-A is COMPULSORY consisting of TEN questions carrying TWO marks each.
  2. SECTION-B contains FIVE questions carrying FIVE marks each and students have to attempt any FOUR questions.
  3. SECTION-C contains THREE questions carrying TEN marks each and students have to attempt any TWO questions.
  4. --- Content provided by​ FirstRanker.com ---

SECTION-A

Answer briefly :

  1. Differentiate between stack allocation and static allocation.
  2. Name two compiler construction tools.
  3. Define ‘Code Motion’ and ‘Constant Folding’ with examples.
  4. --- Content provided by FirstRanker.com ---

  5. Define ‘Basic Block’ and write about its significance.
  6. Write at least two differences between LR (0) parsers, SLR (1) parsers, CLR (1) and LALR Parsers.
  7. Show that the grammar is ambiguous: S ? Sa S? bS S ? c
  8. List the functions of a pre-processor.
  9. How do Self Hosting Compilers work?
  10. --- Content provided by‍ FirstRanker.com ---

  11. Name 3 forms of output of code generator.
  12. Write the triple representation of x := y[i].

FirstRanker.com

SECTION-B

  1. 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
  2. Translate the arithmetic expression a * - (b + c ) into
    1. Postfix notation
    2. Three-address code
  3. --- Content provided by‍ FirstRanker.com ---

  4. What is the role of the lexical analyzer? Explain the issues in lexical analysis.
  5. What is Code Optimization? Describe the principle sources of optimization.
  6. Explain the various storage allocation strategies applied to activation records.

SECTION-C

  1. Explain in detail the process of compilation. Illustrate the output of each phase of compilation for the input “a = (b+c) * (b+c) * 2”.
  2. --- Content provided by FirstRanker.com ---

  3. What is the need of symbol table. Explain various data structures used for its storage.
  4. 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
    1. Construct a table-based LL(1) predictive parser for G;
    2. Give the parsing actions for the input string “(dc)ac”.

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.

FirstRanker.com

--- 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 ---