Compiler Design Quiz-II 2016 17
Compiler Design Quiz-II 2016 17
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