0% found this document useful (0 votes)
365 views6 pages

Compiler Design Quiz-II 2016 17

The document contains multiple choice questions about compiler design topics such as intermediate code representations, parsing techniques, syntax analysis, optimization strategies, and more. It tests knowledge of foundational concepts like parse trees, LR parsing, attribute grammars, data flow analysis, loop optimizations, and intermediate code forms.

Uploaded by

kishorebab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
365 views6 pages

Compiler Design Quiz-II 2016 17

The document contains multiple choice questions about compiler design topics such as intermediate code representations, parsing techniques, syntax analysis, optimization strategies, and more. It tests knowledge of foundational concepts like parse trees, LR parsing, attribute grammars, data flow analysis, loop optimizations, and intermediate code forms.

Uploaded by

kishorebab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1.__________isagraphrepresentaonofaderivaon.

A)Theparsetree

B)Theocttree

C)Thebinarytree

D)Noneoftheabove

2.Theopmizaonwhichavoidstestateveryiteraonis

A)Loopunrolling

B)Loopjamming

C)Constantfolding

D)Noneofthese

3.Syntaxdirectedtranslaonschemeisdesirablebecause

A)Itisbasedonthesyntax

B)Itsdescriponisindependentofanyimplementaon

C)Itiseasytomodify

D)Allofthese

4.Whichofthefollowingparserismostpowerful?

A)Operatorprecedence

B)CanonicalLR

C)LALR

D)SLR

5.Inheritedaributeisanaturalchoicein

A)Keepingtrackofvariabledeclaration

B)CheckingforthecorrectuseofLvaluesandRvalues

C)BothAandB

D)Noneofthese

6.Theopmizaontechniquewhichistypicallyappliedonloopsis

A)Removalofinvariantcomputaon

B)Peepholeopmizaon

C)Constantfolding

D)Allofthese

7.Conceptwhichcanbeusedtoidenfyloopsis

A)Dominators

B)Reduciblegraphs

C)Depthrstordering

D)Allofthese

8.Localandloopopmizaoninturnprovidemovaonfor

A)Dataflowanalysis

B)Constantfolding

C)Peeholeopmizaon

D)DFAandconstantfolding

9.LRstandsfor

A)Le toright

B)Le torightreducon

C)Righttole

D)Lefttorightandrightmostderivationinreverse

10.Grammaroftheprogrammingischeckedat________phaseofcompiler.

A)semancanalysis

B)codegeneraon

C)syntaxanalysis

D)codeopmizaon

11.Whichofthefollowingisnotanintermediatecodeform?
A)Posixnotaon

B)Syntaxtrees

C)Threeaddresscodes

D)Quadruples

12.Acompilerthatrunsononemachineandproducescodeforadierentmachineiscalled

A)Crosscompilation

B)Onepasscompilaon

C)Twopasscompilaon

D)Noneoftheabove

13.Thegraphthatshowsbasicblocksandtheirsuccessorrelaonshipiscalled

A)DAG

B)Flowchart

C)Controlgraph

D)Hamiltoniangraph

14.Agrammarismeaningless

A)Ifterminalsetandnonterminalsetarenotdisjoint

B)Ifle handsideofaproduconisasingleterminal

C)Ifle handsideofaproduconhasnononterminal

D)Allofthese

15.Whichofthefollowingisusedforgroupingofcharactersintotokens?

A)Parser

B)Codeopmizaon

C)Codegenerator

D)Lexicalanalyzer

16.Anopmizercompiler

A)Isopmizedtooccupylessspace

B)Isopmizedtotakelessmeforexecuon
C)Opmizesthecode

D)Noneofthese

17.Peeholeopmizaon

A)Loopopmizaon

B)Localopmizaon

C)Constantfolding

D)Dataowanalysis

18.Theaconofparsingthesourceprogramintopropersyntaccclassesiscalled

A)Syntaxanalysis

B)Lexicalanalysis

C)Interpretaonanalysis

D)Generalsyntaxanalysis

19.Threeaddresscodeinvolves

A)Exactly3address

B)Atmostmost3address

C)Nounaryoperators

D)Noneofthese

20.Anintermediatecodeformis

A)Posixnotaon

B)Syntaxtrees

C)Threeaddresscode

D)Allofthese

21.Reduconinstrengthmeans

A)Replacingruntimecomputationbycompiletimecomputation

B)Removingloopinvariantcomputaon

C)Removingcommonsubexpression
D)Replacingacostlyoperaonbyarelavelycheaperone

22.Codecanbeopmizedat

A)Sourcefromuser

B)Targetcode

C)Intermediatecode

D)Alloftheabove

23.Typecheckingisnormallydoneduring

A)Lexicalanalysis

B)Syntaxanalysis

C)Syntaxdirectedtranslation

D)Codeopmizaon

24.Theopmizaonwhichavoidstestateveryiteraonis

A)Loopunrolling

B)Loopjamming

C)Constantfolding

D)Noneofthese

25.Syntaxdirectedtranslaonschemeisdesirablebecause

A)Itisbasedonthesyntax

B)Itsdescriponisindependentofanyimplementaon

C)Itiseasytomodify

D)Allofthese

26.Whichofthefollowingisnotanintermediatecodeform?

A)Posixnotaon

B)Syntaxtrees

C)Threeaddresscodes

D)Quadruples

You might also like