SSD5单选.docx
- 文档编号:3002673
- 上传时间:2022-11-17
- 格式:DOCX
- 页数:43
- 大小:97.76KB
SSD5单选.docx
《SSD5单选.docx》由会员分享,可在线阅读,更多相关《SSD5单选.docx(43页珍藏版)》请在冰豆网上搜索。
SSD5单选
1.1.1
1.C++issaidtobeanobject-orientedlanguagebecauseofitssupportfor(b)
(a)C-stylecomments
(b)classes,inheritance,andpolymorphism
(c)attendantalgorithms
(d)pointers
2.WhichofthefollowingstatementsaboutC++is(are)true(c)
Itisstronglytyped.
IthasbeenstandardizedbyISO.
(a)None
(b)Ionly
(c)IandII
(d)IIonly
1.1.2
1.AllofthefollowingcharactersareallowedtobepartofavalidC++identifierexcept(a)
(a)-(hyphen)
(b)_(underscore)
(c)X
(d)3
2.Toproduceanexecutableimage,aC++sourcefilemustbe_____,then_____,andfinally_____.(c)
(a)linked,preprocessed,compiled
(b)compiled,preprocessed,linked
(c)preprocessed,compiled,linked
(d)compiled,linked,preprocessed
3.Attheendofthe_____stageforaC++program,a(n)_____canbeproduced.(c)
(a)linking,sourcefile
(b)preprocessing,objectfile
(c)linking,executableimage
(d)compiling,preprocessedfile
4.InC++,thedirective#includeisprocessedbythe(a)
(a)preprocessor
(b)StandardTemplateLibrary
(c)linker
(d)compiler
1.2.1
1.Linesatastore,filecabinets,andbookcasesarereal-worldentitiesthatmostresemble_____incomputerscience.(a)
(a)datastructures
(b)functionalprogramminglanguages
(c)algorithms
(d)object-orientedprogramminglanguages
2.Incomputerscience,astructuredrepresentationofinformationisknownasa(n)(b)
(a)cache
(b)datastructure
(c)algorithm
(d)processor
3.Anorderedsetofdirectivesthatcanbecarriedoutmechanicallyisknownasa(n)(b)
(a)hashtable
(b)algorithm
(c)associativearray
(d)tree
1.2.2
1.Decompositionofaprobleminvolveswhichofthefollowing?
(d)
(a)Simplifyingtheproblembyeliminatinglow-priorityrequirements
(b)Determiningaprogramminglanguageforimplementingasolutiontotheproblem
(c)Reverse-engineeringanalgorithmthatsolvesadifferentproblem
(d)Identifyingentitiesandrelationshipsthatwillaidinsolvingtheproblem
1.3.1
1.WhichofthefollowingexpressionsevaluatestotrueinC++ifandonlyiftheindexvariableiisinboundsforanarrayofsize10?
(c)
(a)0<10
(b)0<=i&&i<=10
(c)0<=i&&i<10
(d)0<=i<10
2.WhichofthefollowinglistsofC++typesareorderedincreasinglybysize,ascomputedbysizeof()?
(d)
(a)short,char,int,long
(b)long,int,short,char
(c)long,int,char,short
(d)char,short,int,long
3.EachofthefollowingisabasicC++typeexcept(c)
(a)bool
(b)char
(c)byte
(d)unsignedint
1.3.2
1.Thepurposeoftheassignmentoperatoristo(b)
(a)beusedinternallyinanobject'scopyconstructor
(b)provideforproperassignmentbetweenobjects
(c)initializedatamemberswhenaninstanceisfirstcreated
(d)preventmemoryleaks
2.Ifauser-definedclassComplexhasoverloadedoperator+=,thenonewouldexpectthisoperatortohavewhichofthefollowingdeclarations?
(c)
(a)voidoperator+=(constComplex&rhs);
(b)voidoperator+=(floatreal,floatimag);
(c)Complex&operator+=(constComplex&rhs);
(d)Complex&operator+=(constComplexrhs);
3.AssumethatThingisauser-definedclass,andconsiderthefollowingcodefragment,whereBisaninstanceofThing.
ThingA=B;
Whichofthefollowingisaclassmemberthatisusedinthiscodefragment?
(c)
(a)Theassignmentoperator
(b)Thedefaultconstructor
(c)Thecopyconstructor
(d)Thedestructor
4.AssumethatThingisauser-definedclass,andconsiderthefollowingfunction.
Thingf(Thing&A){
ThingB;
B.x=A.x;
returnB;
}
Whereinthiscodewillacopyconstructorbeused?
(b)
(a)IncopyingthedatafromAtoB
(b)Inthereturnoperation
(c)Inpassingtheparameter
(d)InthecreationofthelocalvariableB
5.Whichofthefollowingistrueaboutaclasswithouta(user-defined)constructor?
(a)
(a)Itmayhaveadestructor,butmightnot.
(b)Itcannothaveadestructor.
(c)Itmusthaveadestructor.
(d)Itcannothaveanassignmentoperator.
6.InaC++class,accesstodatamembersandfunctionmembersaretypically(b)
(a)bothprivate
(b)privateandpublic,respectively
(c)publicandprivate,respectively
(d)bothpublic
7.Towhichofthefollowingisobject-basedprogrammingideallysuited?
(b)
(a)Implementingsimplemonolithicprograms
(b)Encapsulation
(c)Attainingthehighestpossibleefficiency
(d)Providingelegantmechanismsforcodereuse
1.3.3
1.RegardingC++standardI/O,the_____operatorwritestoastreamandthe_____operatorreadsfromastream.(d)
(a)>,<
(b)>>,<<
(c)<,>
(d)<<,>>
2.Supposeinfisanavailableifstreamandcisanavailablecharacter.Considerthefollowingcodefragment.
do
c=inf.get();
while(!
inf.eof()&&isspace(c));
Whichofthefollowi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SSD5