SlideShare a Scribd company logo
1 of 6
Complier Design
Class : M.Sc CS
1. A --------------- is a program that accepts a program written in one programming language
and produces output in another language.
a. compiler b. interpreter
c. assembler d. translator
2. Portions of one or more phases are combined into a module is called a --------.
a. pass b. coroutine
c. subroutine d. synthesis
3. The ----------- is the interface between the source program and the compiler.
a. lexical analyzer b. scanner
c. syntax analyzer d. both a and b
4. A large block of storage that may be partitioned into smaller blocks is known as --------.
a. linked list b. tree
c. heap d. compaction
5. The symbol Sigma is used to denote ---------.
a. empty b. alphabet
c. characters c. summation
6. The expression (aa/bb/ba/bb)* denotes all strings of -------.
a. odd b. even
c. zero d. all of the above
7. ----------- is a program that accepts a string x and say ‘yes’ if x is a sentence and ‘no’
otherwise.
a. DFA b. NFA
c. automataon d. recognizer
8. A notation which is suitable for describing tokens is known as ----------.
a. regular expression b. transition diagram
c. context-free grammar d. regular grammar
9. No transition on empty input is the property of
a. NFA b. DFA
c. BNF d. NDFA
10. The set of all strings generated by the expression aa*/bb* is
a. {a,aa,aaa,...} b. {b,bb,bbb,...}
c. both a and b d. either a or b
11. The syntactic structure of a programming language is described by ---------------.
a. context-free grammar b. regular grammar
c. context-sensitive grammar d. phrase-structure grammar
12. The word ‘token’ is a synonym for -------------.
a. start symbol b. production
c. nonterminal d. terminal
13. Graphical representation of derivations is said to be ----------.
a. syntax tree b. binary tree
c. search tree d. parse tree
14. A grammar that produces more than one parse tree for some sentence is called ----------.
a. ambiguous grammar b. unambiguous grammar
c. regular grammar d. context-free grammar
15. The string ‘w’ denotes the string of terminals is called ----------.
a. sentential form of G b. sentence
c. leftmost derivation d. rightmost derivation
16. The process of replacing the right side of production with the left side is known as --------.
a. derivation b. construction
c. recognition d. reduction
17. A rightmost derivation in reverse is obtained by -----------.
a. handle b. handle pruning
c. reduction d. all of the above
18. The symbol to mark the bottom of the stack and the right end of the of the input is -------.
a. # b. $
c. & d. @
19. A grammar with no production right side has two adjacent nonterminals is called --------.
a. operator grammar b. conditional grammar
c. LR grammar d. LR(k) grammar
20. ------------ cancause a top-down parser into an indefinite loop.
a. left-recursion b. right-recursion
c. backtracking d. pruning
21. A --------- does not need to scan the entire stack to know the handle that appears on top.
a. predictive parser b. top-down parser
c. bottom-up parser d. LR grammar
22. The most powerful and will work on a large class of grammar but expensive is -----------.
a. SLR b. canonical LR
c. LALR d. LR
23. The function ------------ has two parameters namely state and grammar symbol.
a. GOTO b. ACTION
c. FIRST d. FOLLOW
24. A program fragment is attached with each production is called ---------------.
a. output action b. semantic action
c. semantic rule d. all of the above
25. Let AXYZ and {Y.VAL:=2*A.VAL }, then it is a kind of ------------- translation.
a. synthesized b. inherited
c. syntax directed d. both a and b
26. The postfix notation a*(b+c) is
a. abc+* b. bc+a*
c. abc*+ d. a*bc+
27. The three address statements T1:=B and C and T2:=A OR T1 represent the Boolean
expression
a. B and C or A b. A or B and C
c. B or C and A d. both a and b
28. A record structure with four fields to implement three address statements is called -------.
a. triples b. indirect triples
c. quadruples d. syntax trees
29. Listing of pointers to triples rather than triples is called ----------.
a. triples b. indirect triples
c. DAG d. flow graph
30. Subsequent filling of quadruples for Boolean expressions to which the jumps are to be
made is referred to as -------------.
a. makelist b. merge
c. backtracking d. backpatching
31. Which of the following data structure is not used to implement symbol table?
a. lists b. binary search trees
c. hash tables d. AVL trees
32. Which of the following is not true for error detection and recovery?
a. main task for compiler b. errors detected during lexical analysis
c. compiler retruns an error d. all of the above
33. A ------------ is the simplest to implement but the performance is poor.
a. linear list b. self organizing list
c. binary search tree d. hash table
34. ------------- based on the property that no limit on the number of entries.
a. binary search trees b. lists
c. open hashing d. closed hashing
35. Performance of hashing is measured in time is
a. log2(n+e) b. cn(n+e)
c. n(n+e) d. n(n+e)/m
36. Single execution of a procedure is managed by
a. static allocation b. heap allocation
c. activation record d. stack allocation
37. -------------- allocation allocates and deallocates storage as needed at run time from a data
area.
a. static b. stack
c. heap d. both a and b
38. ----------- canbe detected during either compile time or runtime.
a. syntax error b. semantic error
c. runtime error d. logical error
39. ---------- can be detected at compile time.
a. syntax error b. semantic error
c. runtime error d. logical error
40. ------------- was designed to permit static storage allocation.
a. FORTRAN b. PASCAL
c. C d. JAVA
41. Optimize code by
a. dead code elimination b. common subprograms
c. data flow analysis d. loop declaration
42. The optimization which avoids test at every iteration is
a. loop unrolling b. loop jamming
c. constant folding d. all of the above
43. A graph that shows basic blocks and their successor relationship is called
a. DAG b. flow graph
c. labelled graph d. acyclic graph
44. ---------- moves code outside the loop.
a. code motion b. code elimination
c. loop invariant d. loop optimization
45. Reduction in strength means
a. moving code outside the loop b. expensive operation by cheaper one
c. eliminating common subexpression d. induction variable elimination
46. --------- is used for analyzing basic blocks automatically.
a. DAG b. flow graph
c. acyclic graph d. labelled graph
47. ------------- optimization examining a short sequence of target code.
a. loop b. local
c. peephole d. code
48. The input of the code generation algorithm is
a. postfix notations b. syntax trees
c. quadruples d. three address code
49. --------------- keeps track of the location where the current value of the name can be found.
a. register descriptor b. address descriptor
c. register d. all of the above
50. A leader in basic block means
a. first statement of basic block
b. target of conditional and unconditional goto
c. any statement that follows a goto or unconditional go to
d. all of the above
##################
Complier Design
Answer Key
1)d 2)a 3)c 4)c 5)b 6)b 7)d 8)a 9)b 10)d 11)a 12)d 13)d 14)a 15)b 16)d 17)b 18)b 19)a 20)a
21)d 22)b 23)a 24)d 25)b 26)a 27)d 28)c 29)b 30)d 31)d 32)a 33)c 34)c 35)d 36)c 37)c 38)b
39)a 40)a 41)a 42)a 43)b 44)a 45)b 46)a 47)c 48)d 49)b 50)d
.

More Related Content

What's hot

0015.register allocation-graph-coloring
0015.register allocation-graph-coloring0015.register allocation-graph-coloring
0015.register allocation-graph-coloring
sean chen
 
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD Editor
 
C programming session 11
C programming session 11C programming session 11
C programming session 11
Vivek Singh
 

What's hot (20)

Ec2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.org
 
Multiplier and Accumulator Using Csla
Multiplier and Accumulator Using CslaMultiplier and Accumulator Using Csla
Multiplier and Accumulator Using Csla
 
A109210503 digitallogicdesign1
A109210503 digitallogicdesign1A109210503 digitallogicdesign1
A109210503 digitallogicdesign1
 
Assembly language solution
Assembly language  solutionAssembly language  solution
Assembly language solution
 
0015.register allocation-graph-coloring
0015.register allocation-graph-coloring0015.register allocation-graph-coloring
0015.register allocation-graph-coloring
 
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
 
Principles of Combinational Logic-1
Principles of Combinational Logic-1Principles of Combinational Logic-1
Principles of Combinational Logic-1
 
Lec 04 - Gate-level Minimization
Lec 04 - Gate-level MinimizationLec 04 - Gate-level Minimization
Lec 04 - Gate-level Minimization
 
Compiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow AnalysisCompiler Construction | Lecture 10 | Data-Flow Analysis
Compiler Construction | Lecture 10 | Data-Flow Analysis
 
2015 16combinepdf
2015 16combinepdf2015 16combinepdf
2015 16combinepdf
 
GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004GATE Computer Science Solved Paper 2004
GATE Computer Science Solved Paper 2004
 
Compiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone FrameworksCompiler Construction | Lecture 11 | Monotone Frameworks
Compiler Construction | Lecture 11 | Monotone Frameworks
 
Basic Block
Basic BlockBasic Block
Basic Block
 
Lecture 16 17 code-generation
Lecture 16 17 code-generationLecture 16 17 code-generation
Lecture 16 17 code-generation
 
C programming session 11
C programming session 11C programming session 11
C programming session 11
 
6th Semester (December; January-2014 and 2015) Computer Science and Informati...
6th Semester (December; January-2014 and 2015) Computer Science and Informati...6th Semester (December; January-2014 and 2015) Computer Science and Informati...
6th Semester (December; January-2014 and 2015) Computer Science and Informati...
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
A HIGH THROUGHPUT AES DESIGN
A HIGH THROUGHPUT AES DESIGNA HIGH THROUGHPUT AES DESIGN
A HIGH THROUGHPUT AES DESIGN
 
microcomputer architecture-Instruction formats
microcomputer architecture-Instruction formatsmicrocomputer architecture-Instruction formats
microcomputer architecture-Instruction formats
 
Relay Vehicle Formations for Optimizing Communication Quality in Robot Networks
Relay Vehicle Formations for Optimizing Communication Quality in Robot NetworksRelay Vehicle Formations for Optimizing Communication Quality in Robot Networks
Relay Vehicle Formations for Optimizing Communication Quality in Robot Networks
 

Similar to Complier design one mark Q & A 50 by S. Yamini

Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfChapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
akknit
 
Ugcnet4 u
Ugcnet4 uUgcnet4 u
Ugcnet4 u
sadhi
 
RailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsRailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMs
Lourens Naudé
 
Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014
Sreeju Sree
 

Similar to Complier design one mark Q & A 50 by S. Yamini (20)

Bc0042 os-mqp
Bc0042 os-mqpBc0042 os-mqp
Bc0042 os-mqp
 
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012C aptitude 1st jan 2012
C aptitude 1st jan 2012
 
C MCQ
C MCQC MCQ
C MCQ
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdfChapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
Chapter 1 Introduction to Computers- Programs- and Java 1- A Java prog.pdf
 
AP PGECET Computer Science 2016 question paper
AP PGECET Computer Science 2016 question paperAP PGECET Computer Science 2016 question paper
AP PGECET Computer Science 2016 question paper
 
Ugcnet4 u
Ugcnet4 uUgcnet4 u
Ugcnet4 u
 
Pgcet Computer Science 2015 question paper
Pgcet Computer Science 2015 question paperPgcet Computer Science 2015 question paper
Pgcet Computer Science 2015 question paper
 
Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQs
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
Model question paper_mc0061
Model question paper_mc0061Model question paper_mc0061
Model question paper_mc0061
 
C test
C testC test
C test
 
Datastructure bsc2
Datastructure bsc2 Datastructure bsc2
Datastructure bsc2
 
tools.ppt
tools.ppttools.ppt
tools.ppt
 
Vp 3
Vp 3Vp 3
Vp 3
 
RailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsRailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMs
 
Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014
 
Gate-Cs 1995
Gate-Cs 1995Gate-Cs 1995
Gate-Cs 1995
 
10th computer paper
10th computer paper10th computer paper
10th computer paper
 

More from eeducations ever

Methods of pattern making - S. Manohari
Methods of pattern making - S. ManohariMethods of pattern making - S. Manohari
Methods of pattern making - S. Manohari
eeducations ever
 

More from eeducations ever (12)

Yokes and Types
Yokes and TypesYokes and Types
Yokes and Types
 
Introduction to Pattern making
Introduction to  Pattern makingIntroduction to  Pattern making
Introduction to Pattern making
 
Methods of Pattern Making
Methods of Pattern MakingMethods of Pattern Making
Methods of Pattern Making
 
Sewing Tools and Equipment
Sewing Tools and EquipmentSewing Tools and Equipment
Sewing Tools and Equipment
 
SEWING TOOLS AND EQUIPMENTS - S.Manohari, Msc.,
SEWING TOOLS AND EQUIPMENTS - S.Manohari, Msc.,SEWING TOOLS AND EQUIPMENTS - S.Manohari, Msc.,
SEWING TOOLS AND EQUIPMENTS - S.Manohari, Msc.,
 
Intro to pattern making - S. Manohari
Intro to pattern making - S. ManohariIntro to pattern making - S. Manohari
Intro to pattern making - S. Manohari
 
Methods of pattern making - S. Manohari
Methods of pattern making - S. ManohariMethods of pattern making - S. Manohari
Methods of pattern making - S. Manohari
 
Ph d regulation_2019 bharathidasan university
Ph d regulation_2019 bharathidasan universityPh d regulation_2019 bharathidasan university
Ph d regulation_2019 bharathidasan university
 
Object Oriented Analysis and Design one marks Q & A
Object Oriented  Analysis  and  Design one marks Q & AObject Oriented  Analysis  and  Design one marks Q & A
Object Oriented Analysis and Design one marks Q & A
 
Soft computing one marks Q&A 50
Soft computing one marks Q&A 50Soft computing one marks Q&A 50
Soft computing one marks Q&A 50
 
Embedded based microprocessor system one marks 50 questions and answers by S...
Embedded based microprocessor system one marks 50 questions and answers  by S...Embedded based microprocessor system one marks 50 questions and answers  by S...
Embedded based microprocessor system one marks 50 questions and answers by S...
 
Advanced Fashion: Standard and Promotion by s. manohari
Advanced Fashion:  Standard and Promotion by s. manohariAdvanced Fashion:  Standard and Promotion by s. manohari
Advanced Fashion: Standard and Promotion by s. manohari
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

Complier design one mark Q & A 50 by S. Yamini

  • 1. Complier Design Class : M.Sc CS 1. A --------------- is a program that accepts a program written in one programming language and produces output in another language. a. compiler b. interpreter c. assembler d. translator 2. Portions of one or more phases are combined into a module is called a --------. a. pass b. coroutine c. subroutine d. synthesis 3. The ----------- is the interface between the source program and the compiler. a. lexical analyzer b. scanner c. syntax analyzer d. both a and b 4. A large block of storage that may be partitioned into smaller blocks is known as --------. a. linked list b. tree c. heap d. compaction 5. The symbol Sigma is used to denote ---------. a. empty b. alphabet c. characters c. summation 6. The expression (aa/bb/ba/bb)* denotes all strings of -------. a. odd b. even c. zero d. all of the above 7. ----------- is a program that accepts a string x and say ‘yes’ if x is a sentence and ‘no’ otherwise. a. DFA b. NFA c. automataon d. recognizer 8. A notation which is suitable for describing tokens is known as ----------. a. regular expression b. transition diagram c. context-free grammar d. regular grammar 9. No transition on empty input is the property of a. NFA b. DFA c. BNF d. NDFA 10. The set of all strings generated by the expression aa*/bb* is a. {a,aa,aaa,...} b. {b,bb,bbb,...} c. both a and b d. either a or b
  • 2. 11. The syntactic structure of a programming language is described by ---------------. a. context-free grammar b. regular grammar c. context-sensitive grammar d. phrase-structure grammar 12. The word ‘token’ is a synonym for -------------. a. start symbol b. production c. nonterminal d. terminal 13. Graphical representation of derivations is said to be ----------. a. syntax tree b. binary tree c. search tree d. parse tree 14. A grammar that produces more than one parse tree for some sentence is called ----------. a. ambiguous grammar b. unambiguous grammar c. regular grammar d. context-free grammar 15. The string ‘w’ denotes the string of terminals is called ----------. a. sentential form of G b. sentence c. leftmost derivation d. rightmost derivation 16. The process of replacing the right side of production with the left side is known as --------. a. derivation b. construction c. recognition d. reduction 17. A rightmost derivation in reverse is obtained by -----------. a. handle b. handle pruning c. reduction d. all of the above 18. The symbol to mark the bottom of the stack and the right end of the of the input is -------. a. # b. $ c. & d. @ 19. A grammar with no production right side has two adjacent nonterminals is called --------. a. operator grammar b. conditional grammar c. LR grammar d. LR(k) grammar 20. ------------ cancause a top-down parser into an indefinite loop. a. left-recursion b. right-recursion c. backtracking d. pruning 21. A --------- does not need to scan the entire stack to know the handle that appears on top. a. predictive parser b. top-down parser c. bottom-up parser d. LR grammar 22. The most powerful and will work on a large class of grammar but expensive is -----------. a. SLR b. canonical LR c. LALR d. LR
  • 3. 23. The function ------------ has two parameters namely state and grammar symbol. a. GOTO b. ACTION c. FIRST d. FOLLOW 24. A program fragment is attached with each production is called ---------------. a. output action b. semantic action c. semantic rule d. all of the above 25. Let AXYZ and {Y.VAL:=2*A.VAL }, then it is a kind of ------------- translation. a. synthesized b. inherited c. syntax directed d. both a and b 26. The postfix notation a*(b+c) is a. abc+* b. bc+a* c. abc*+ d. a*bc+ 27. The three address statements T1:=B and C and T2:=A OR T1 represent the Boolean expression a. B and C or A b. A or B and C c. B or C and A d. both a and b 28. A record structure with four fields to implement three address statements is called -------. a. triples b. indirect triples c. quadruples d. syntax trees 29. Listing of pointers to triples rather than triples is called ----------. a. triples b. indirect triples c. DAG d. flow graph 30. Subsequent filling of quadruples for Boolean expressions to which the jumps are to be made is referred to as -------------. a. makelist b. merge c. backtracking d. backpatching 31. Which of the following data structure is not used to implement symbol table? a. lists b. binary search trees c. hash tables d. AVL trees 32. Which of the following is not true for error detection and recovery? a. main task for compiler b. errors detected during lexical analysis c. compiler retruns an error d. all of the above 33. A ------------ is the simplest to implement but the performance is poor. a. linear list b. self organizing list c. binary search tree d. hash table
  • 4. 34. ------------- based on the property that no limit on the number of entries. a. binary search trees b. lists c. open hashing d. closed hashing 35. Performance of hashing is measured in time is a. log2(n+e) b. cn(n+e) c. n(n+e) d. n(n+e)/m 36. Single execution of a procedure is managed by a. static allocation b. heap allocation c. activation record d. stack allocation 37. -------------- allocation allocates and deallocates storage as needed at run time from a data area. a. static b. stack c. heap d. both a and b 38. ----------- canbe detected during either compile time or runtime. a. syntax error b. semantic error c. runtime error d. logical error 39. ---------- can be detected at compile time. a. syntax error b. semantic error c. runtime error d. logical error 40. ------------- was designed to permit static storage allocation. a. FORTRAN b. PASCAL c. C d. JAVA 41. Optimize code by a. dead code elimination b. common subprograms c. data flow analysis d. loop declaration 42. The optimization which avoids test at every iteration is a. loop unrolling b. loop jamming c. constant folding d. all of the above 43. A graph that shows basic blocks and their successor relationship is called a. DAG b. flow graph c. labelled graph d. acyclic graph 44. ---------- moves code outside the loop. a. code motion b. code elimination c. loop invariant d. loop optimization
  • 5. 45. Reduction in strength means a. moving code outside the loop b. expensive operation by cheaper one c. eliminating common subexpression d. induction variable elimination 46. --------- is used for analyzing basic blocks automatically. a. DAG b. flow graph c. acyclic graph d. labelled graph 47. ------------- optimization examining a short sequence of target code. a. loop b. local c. peephole d. code 48. The input of the code generation algorithm is a. postfix notations b. syntax trees c. quadruples d. three address code 49. --------------- keeps track of the location where the current value of the name can be found. a. register descriptor b. address descriptor c. register d. all of the above 50. A leader in basic block means a. first statement of basic block b. target of conditional and unconditional goto c. any statement that follows a goto or unconditional go to d. all of the above ##################
  • 6. Complier Design Answer Key 1)d 2)a 3)c 4)c 5)b 6)b 7)d 8)a 9)b 10)d 11)a 12)d 13)d 14)a 15)b 16)d 17)b 18)b 19)a 20)a 21)d 22)b 23)a 24)d 25)b 26)a 27)d 28)c 29)b 30)d 31)d 32)a 33)c 34)c 35)d 36)c 37)c 38)b 39)a 40)a 41)a 42)a 43)b 44)a 45)b 46)a 47)c 48)d 49)b 50)d .