系统级编程选择题.docx

上传人:b****1 文档编号:2406937 上传时间:2023-05-03 格式:DOCX 页数:48 大小:33.50KB
下载 相关 举报
系统级编程选择题.docx_第1页
第1页 / 共48页
系统级编程选择题.docx_第2页
第2页 / 共48页
系统级编程选择题.docx_第3页
第3页 / 共48页
系统级编程选择题.docx_第4页
第4页 / 共48页
系统级编程选择题.docx_第5页
第5页 / 共48页
系统级编程选择题.docx_第6页
第6页 / 共48页
系统级编程选择题.docx_第7页
第7页 / 共48页
系统级编程选择题.docx_第8页
第8页 / 共48页
系统级编程选择题.docx_第9页
第9页 / 共48页
系统级编程选择题.docx_第10页
第10页 / 共48页
系统级编程选择题.docx_第11页
第11页 / 共48页
系统级编程选择题.docx_第12页
第12页 / 共48页
系统级编程选择题.docx_第13页
第13页 / 共48页
系统级编程选择题.docx_第14页
第14页 / 共48页
系统级编程选择题.docx_第15页
第15页 / 共48页
系统级编程选择题.docx_第16页
第16页 / 共48页
系统级编程选择题.docx_第17页
第17页 / 共48页
系统级编程选择题.docx_第18页
第18页 / 共48页
系统级编程选择题.docx_第19页
第19页 / 共48页
系统级编程选择题.docx_第20页
第20页 / 共48页
亲,该文档总共48页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

系统级编程选择题.docx

《系统级编程选择题.docx》由会员分享,可在线阅读,更多相关《系统级编程选择题.docx(48页珍藏版)》请在冰点文库上搜索。

系统级编程选择题.docx

系统级编程选择题

MultipleChoiceQuiz1

1.WhichofthefollowingVisualC++objectsarecontainedwithina"Project"?

(a)

I.FilesII.VisualC++SolutionsIII.Flowcharts

a.Ionly

b.I,IIandIII

c.IIonly

d.IIandIIIonly

WhichisthestartpointofaWindowsprogram(d)

a.thestatuswindowoftheVisualC++environment

b.builtbyusingsophisticated"ApplicationWizards"

c.aprogramthatisabletocontroltheoperatingsystemofawindowscomputer

d.thesimplesttypeofapplicationVisualC++cangenerate

3.Whichofthefollowingisabletodescribeacomputationatthehighestlevelofabstraction?

(a)

a.C++code

b.logicGates

c.machinecode

d.Ccode

4.ConsiderthefollowingfragmentofC++sourcecode.(c)

Stringmsg;unsignedintx;inty;

cin>>msg>>x>>y;

cout<

Whichofthefollowingis(are)trueregardingexecutionofthesegment?

1.Theinputstatementwillalwaystakethesameamountoftimetoexecute.

2.Theoutputstatementwillalwaysbeexecutedimmediatelyaftertheinputstatement.

3.Ifxandyarebothpositive,anintegergreaterthanbothwillbeprinted.

a.IIandIIIonly

b.IandIIonly

c.none

d.IIonly

5.Integratedprogrammingenvironmentsmakeitdifficulttomixandmatchtoolsfromdifferentsources.Thisis(b)

a.good,becausetoolsfromdifferentsourcescannotbemadetointeractwitheachother

b.bad,becausenosinglevendorislikelytobethesourceofallthebesttools

c.bad,becauseallthetoolswillthenhavethesameuserinterface

d.good,becauseitensurescompilationisnotdoneincrementallybyaccident

6.Comparedtoasequenceofmachinecodeinstructions,afragmentofCcode(a)

a.maydescribethesamealgorithm

b.isthenativewaytoprogrammostcomputers

c.describestheactionsofthecomputer,notjustoftheCPU

d.doesnotengageanytransistorsduringitsexecution

7.Whichofthefollowingdoesadebuggerdo?

(c)

1.Analyzethesourcecodetofindprogrammingerrors.

2.Decodemachinecodegeneratedbyacompiler.

3.Stopexecutionofaprogram.

a.I,II,andIII.

b.IandIIIonly

c.IIandIIIonly

d.IIIonly

8.Whenusingadebuggertofindthecauseofaprogram'sincorrectbehavior,(a)

a.itisoftennecessarytostarttheprogrammultipletimesunderthedebugger

b.thefaultycodefragmentmustfirstbeidentified

c.theprogramisusuallyexecutedtothepointatwhichthebehavioroccursandthenexecutedbackwardstofindthecause

d.itisfastesttostartbystoppingthedebuggerlongbeforethebehaviorappears

MultipleChoiceQuiz2

1.Inacomputerwith4-bytewords,whichofthefollowingCexpressionstestswhetherptrcontainstheaddressofaword?

(c)

I.(ptr&3)==0

II.(ptr|3)==0

III.(ptr%4)==0

a.IIIonly

b.Ionly

c.IandIIIonly

d.IIonly

2.WhathappensinaCprogramwhenanadditionwouldcauseintegeroverflow?

(a)

a.Anincorrectresultisproducedandexecutioncontinues.

b.Anexception-handleriscalledwiththetwooperandsasparameters.

c.Executionisterminated.

d.Thecorrectvalueiscoercedtoafloatingpointnumber.

3.InC,whatisthefollowingbinarynumberinhexadecimal?

(a)

11010101

a.0xD5

b.0x5D

c.0xB5

d.0xAB

4.Whatisthepurposeoftheexponentinfloatingpointnumbers?

(c)

a.tospecifythebaseasbinary,octal,orhexadecimal

b.themantissaisraisedtothepoweroftheexponent

c.toindicatewherethedecimalorbinarypointshouldbe

d.tospecifythesuperscript

5.Howis-10(decimal)representedinan8-bit2'scomplementbinaryformat?

(a)

a.11110110

b.11110101

c.10001010

d.11111010

6.InC,usingdefaultfloatingpointsettings,whathappenswhenafloating-pointcomputationresultsinanoverflow?

(c)

a.Anerroneousvalueiscomputedandexecutioncontinues.

b.Programexecutionishalted.

c.Aspecialvalue"infinity"iscomputed,testablewith_finite().

d.Anexceptionisraisedunlessdisabledbycalling_controlfp().

7.WhatisthevalueofthefollowingCexpression?

(c)

0x1234&0x5432

a.0x1111

b.0x6666

c.0x1030

d.0x5636

8.Whichofthefollowingnumericaloperationsismostlikelytoleadtolossofprecision?

(c)

a.Floating-pointmultiplication

b.Integeraddition

c.Floating-pointaddition

d.Integermultiplication

9.Whichofthefollowingcouldberepresentedbyonebitofinformation?

(c)

a.thecolorofasinglepixelonatrue-colorcomputerdisplay

b.anASCIIcharacter

c.thepositionofalightswitch

d.thecurrentchannelofatelevisionreceiver

10.Whichofthefollowingstatementsaboutfloating-pointnumbersinCistrue?

(a)

I.Floating-pointnumbersareoftenonlyapproximationsofrealnumbers.

II.A32-bitfloatonlyapproximatesdecimalfractions,buta64-bitdoublerepresentsthemexactly.

III.Floating-pointnumberscanrepresentanyrationalrealnumberbutnotirrationals.

a.Ionly

b.IandIIIonly

c.IIonly

d.IandIIonly

11.Howis46(decimal)representedinan8-bit2'scomplementbinaryformat?

(a)

a.00101110

b.01000110

c.00011110

d.00101100

12.WhatisthevalueofthefollowingCexpression?

(d)

0x1234^0x5432(这是XOR运算)

a.0x1030

b.0x5434

c.0x5636

d.0x4606

MultipleChoiceQuiz3

1:

Theprogramcountercontains(D)

a.thenumberofCPUinstructionsaprogramhasexecutedsofar

b.thenumberoftimesaprogramhasbeenexecuted

c.theamountofmemoryaprogramiscurrentlyusing

d.theaddressoftheCPUinstructionthatisabouttobefetched

2:

Whichofthefollowingisagoodreason(aregoodreasons)toequiptheCPUwithsmallamountsoffastmemory?

(a)

I.Tomakethedesignofthecompilersimpler

II.TomakesomeCPUinstructionssmaller

III.TomakesomeCPUinstructionsfaster

a.IIandIIIonly

b.I,II,andIII

c.IIIonly

d.IIonly

3.WhichofthefollowingmustbetrueifaprogramisstoppedataspecificlinewithintheVisualC++debugger?

(D)

I.Thereisatleastonebreakpointenabled.

II.Thereisabreakpointenabledonthatline.

III.Thereisabreakpointenabledonthelineprecedingthatline.

a.Ionly

b.IandIIonly

c.IandIIIonly

d.none

4:

ProgramscompiledforanIntelPentiumprocessordonotexecuteproperlyon

aSPARCprocessorfromSunMicrosystemsbecause(B)

a.copyrightsregardingcodecannotbeviolated

b.theoperationcodesunderstoodbythetwoprocessorsaredifferent

c.theassemblymnemonicsforthesame"opcode"aredifferentinthetwoprocessors

d.thememoryofaSPARCCPUisnumberedfromtoptobottom

5:

WithinVisualC++,whichofthefollowingwillrevealthevalueofvariablewhentheprogramisstoppedatabreakpoint?

(B)

I.Placingthemousepointeroverthevariablenameinthesourcefilewindow.

II.Insertingaprintf()intheprogram.

III.Typingthevariablenameonthe"Watch"window.

a.IIIonly

b.IandIIIonly

c.I,II,andIII

d.IIandIIIonly

6:

ImmediatelyaftertheCPUexecutesaninstructionthatisneitherabranch

norajumpinstruction,theprogramcounter(B)

a.remainsunchanged

b.isincrementedtopointtothefollowinginstruction

c.hasavaluethatcannotbedeterminedwithoutfurtherinformation

d.isincrementedbyone

7:

ACPUregisterisawordofCPUmemorythat(C)

a.housesacriticalvariableforthedurationoftheexecutionofaprogram

b.recordstheresultsofperiodicCPUdiagnostics

c.isexplicitlyloadedandunloadedfromnormalmemorybycompiler-generatedinstructions

d.isautomaticallyloadedwhenaCPUinstructionreferstoawordofnormalmemory

8:

WhichofthefollowingcomputationsmaybeperformedbyexactlyoneCPUinstruction?

(A)

1.a=5;

2.a=b+c*5;

3.for(i=0;i<10;i+=a[i++]);

a.Ionly

b.IIonly

c.I,II,andIII

d.IandIIonly

9:

Supposethat,usingatoolsuchasthememorywindowofVisualC++,wefoundthatacertainsetofcontiguousmemorylocationscontainedtheinteger0xC605CD623A8365000000.Whatcouldthesememorylocationshold?

(D)

1.theinteger0xC605CD623A8365000000

2.astring

3.aCPUinstruction

a.Ionly

b.IIIonly

c.IandIIonly

d.I,II,andIII

10:

Abranchinstruction(A)

a.setstheprogramcountertooneoftwopossiblevalues

b.increasestheprogramcounterbyafixedamount

c.setstheprogramcountertooneofmanypossiblevalues

d.unconditionallysetstheprogramcountertoitsoperand

11:

Ajumpinstruction(D)

a.changestheprogramcounteronlyifitsoperandisequaltozero

b.changesapointertopointtothenextelementofanarray

c.increasestheprogramcounter

d.unconditionallysetstheprogramcountertoitsoperand

12:

Themachinecodegeneratedfromsourcecodebyacompiler(C)

a.associatesvariablevalueswiththeirnames

b.executesmorequicklythanthesourcecode

c.doesnotpreservealltheinformationgiveninthesourcecode

d.canbeeasilyinspectedtocheckthecorrectnessofthecompiler

13:

Whichofthefollowingaretrueoftheeffectthatoptimizationshaveonthemachinecodegeneratedbycompilers?

(B)

I.Theresultingcodewillbefasterand/orsmaller.

II.Theresultingcodewillbeclearer.

III.Theresultingcodewillbehardertodebug.

a.I,II,andIII

b.IandIIIonly

c.IandIIonly

d.Ionly

MultipleChoiceQuiz4

1:

InC,assumingthataninttakes4bytes,ifarrayaisdeclar

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 求职职场 > 简历

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2