西交《程序设计基础(高起专)》在线作业

西交《程序设计基础(高起专)》在线作业

ID:30857970

大小:130.04 KB

页数:27页

时间:2019-01-04

西交《程序设计基础(高起专)》在线作业_第1页
西交《程序设计基础(高起专)》在线作业_第2页
西交《程序设计基础(高起专)》在线作业_第3页
西交《程序设计基础(高起专)》在线作业_第4页
西交《程序设计基础(高起专)》在线作业_第5页
资源描述:

《西交《程序设计基础(高起专)》在线作业》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、西交《程序设计基础(高起专)》在线作业Westernexchange^programdesignfoundation(hightechnicalspecialty)onlinehomeworkTestscores:100testtime:一testscores:100One,singletopic(50questions,100points)・Score:100Thefollowingstatementistrue()YoucandefinedefineandifasAuseridentifierYouc

2、andefinedefineasauseridentifier,butyoucan,tdefineanifasauseridentifierC.youcandefinetheifasauseridentifier,butyoucan,tdefinedefineasauseridentifierD.defineandifarenotdefinedasuseridentifiersAnswer:BAscoreof2points:2Theoutputofthefollowingprogramis()main()

3、{inta=4,b=5,c二0,d;D=!A&&!B

4、

5、!C;Printf(〃%d“,d);}1A.B.0B.thenumberofnon一zeroC.1Answer:A,Ascoreof2points:2Ifthepointerpiscorrectlydefined,theincorrectstatementis()tomaketheppointtotwoconsecutiveintegerdynamicstorageunits・A.p=2*(int*)malloc(int);B.p二(int*)m

6、alloc(2*sizeof(int));C.P二(int*)malloc(2*2);D.P二(int*)calloc(2,sizeof(int));Answer:A,Ascoreof2points:2Whatisincorrectabouttheswitchstatementis()TheorderofA.CasedoesnotaffecttheexecutionresultTheconstantsinthebackofeachcasestatementcanbedifferentAfterexecut

7、ingacasestatement,thenextcasestatementisexecutedTheexpressionaftereachcasestatementcanonlybeconstantAnswer:BAscoreof2points:25.A:x二9;Y二++x;Theresultis()A.x二9.Y二9;B.x二10;Y二10;C・x二9.Y二10;D.x二10;Y二9;Answer:BAscoreof2points:2WhenitcomestoPointers,thefollowing

8、statementisfalse()A.ThepointervariableisusedtoholdthememoryaddressB.&meansthevariableaddressoperationC.*indicatestheoperationofthevariablecontentthatthepointervariablepointstoD.CanassignanintegertoapointervariableAnswer:DAscoreof2points:2Thefollowingstate

9、mentisfalse()A.elseisalwaysontopofitTheconditionalexpressioncanbeenclosedinparentheses・ThewholeifstatementisconsideredastatementintheprogramThestatementsinthed.ifstatementcanbeeitherastatementoracompoundstatementAnswer:BAscoreof2points:2Whichofthefollowin

10、gisnotthefeatureofthealgorithm()A.havepoorsexB.thefeasibilityuncertaintyD.inputAnswer:CAscoreof2points:2Thefollowingexpression:intI,*IP二&Iiscorrect()A.thisexpressioniswrongThisexpressionindicatesthattheIPisinitializ

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。