资源描述:
《c语言上机考试试题(c language examination questions)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、c语言上机考试试题(Clanguageexaminationquestions)2010-03-22-001P2010-03-2210:07-11:07(100minutes)[##1-25],asinglechoice.[###1-1-4]IntheClanguage,foroperandmustbeanintegraloperatoris(A)%(B)/(C)"(D)![###1-2-4]Inordertoavoidtheambiguityofthetwonestedif-elsestatement,CelselanguageisalwaysWith__
2、__pairedrelationship(A)thesameifindentposition(B)intheunpairedifbefore(C)theunpairedbeforetherecentif(D)onthesamelineofif[###1-3-4]Clanguageoftheexecutableprogramisexecuted()(A)programinthefirstexecutablestatement(B)afunctionintheprogram(C)mainfunctionintheprogram(D)thefirstfilecon
3、tainsthefunction[###1-4-4]Thefollowingstatement:scanf(a=%d,b=%d,c=%d,&a,&b,&c);Inordertomakethevalueofais1,thevalueofBis2,fromthekeyboardinputdatacorrectlyTheformis()(A)1,2,3(B)1,3,2(C)a=1,b=2,c=3(D)a=1,b=3,c=2;[###1-5-4]Iftheoperator:>,*=,%,sizeof,whichisaccordingtopriority(fromlo
4、wtohigh)inthecorrectorder(A)>=sizeof%(B)>=%sizeof(C)=>sizeof%(D)*=>%sizeof[###1-6-4]KnownletterAASCIIcodeis65,theresultsoftheexecutionoftheprogramis()#include(main){charc1='A',c2='Y';Printf("%d%d",",C1,C2);}(A)A,Y(B)65,65(C)65,90(D)65,89[###1-7-4]IntheClanguage,thelogicv
5、alueof"true"(with)said(A)true(B)anumbergreaterthan0Noninteger(C)0Thenumber0(D)[###1-8-4]ThreebasicstructureoftheClanguageprogramis()(A)sequencestructure,selectionstructure,circulationstructure(B)recursivestructure,loopstructureandtransferstructure(C)nestedstructure,recursivestructu
6、re,sequencestructure(D)theloopstructure,transferstructure,orderstructure[###1-9-4]IntheClanguage,characterdatainmemoryto(stored)(A)sourcecode(B)data(C)BCDcode(D)ASCIIcode[###1-10-4]Thedefinitionofint(*swap)refersto(A)referstoareturntotheintegervalueofthefunctionswap(B)referstoapoin
7、tertothefunctionreturnsapointertoanintegervalueswap(C)referstoapointertoafunctionpointer(SWAP)functionreturnsanintegervalue(D)theabovestatementsarewrong[###1-11-4]Forlinkstothesametypeofpointervariable,not(operation)(A+)(B)-(=C)(=D)[###1-12-4]SimpledatatypesincludingClanguage(A)int
8、eger,realandlogical(B),int