资源描述:
《双语c期末复习资料(2013级)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、C语言(双语)复习资料(2013)第1章C语言基础1.int,char,float,doubleareallbasicdatatypesinClanguage.(对)2.Providedthatthelengthofintis16bits,thenthevaluescopeofunsignedintis:(B)A.0~255B.0~65535C.-32768~32767D.-256~2553.Thedeclarationis:intk=0,a=0,b=0;
unsignedlongw=5;
doublex=1.42,y=0;
thentheincorrect
2、expressionis_A__A.y=x%3B.w+=-2C.x=w+5D.k*=a+b4.InC,basicdatatypesareint,char,floatand_double_____.5.Supposedeclaration:chara=’c’;thenstatement:printf(“%d”,a);iswrong.(错)6.Supposedeclaration:inta;floatx,y;thentheresultdatatypeofexpression:x+a%3*(int)(x+y)%2/4is_float_____.7.Thedatat
3、ypeofexpression:18/4*sqrt(4.0)isfloat.(错)8.Supposedeclaration:chara;thenexpression:ch=’5+9’iscorrect.(错)
9.Incorrectstringconstantis:(A)A.‘abc’B.“1212”C.“0”D.“”10.IfRateisasymbolconstant,wecanuseitasRate++.(错)11.Asvariablename,tmpvarandTmpVararesame.(错)12.Keywordscanbeusedasvariabl
4、enames.(错)13.Thefirstcharacterofvariablenamemustbealetteroraunderscore(_).(对)14.Whichofthefollowingiserror?(A)A.Keywordscanbeusedasvariablenames.B.Wetendtouseshortnamesforlocalvariables,especiallyloopindices,andlongernamesforexternalvariables.C.Uppercaseandlowercaselettersinvariabl
5、enamesaredistinct.D.Thefirstcharacterofvariablenamemustbealetteroraunderscore(_).15.Thestatement:intn1=n2=10;iscorrect.(错)16.Thedeclaration:floatf=f+1.1;iscorrect.(错)17.Whichofthefollowingistheillegalvariablenames?(D)A.LadB.n_10C._567D.g#k18.Supposedeclaration:charc=’101’;thenthec
6、ountofcharacterinvariablecis___A__.(对)19.Supposedeclaration:charc=’ 61’;thenthecountofcharacterinvariablecis___1__.(对)20.Supposedeclaration:charc=’’;thenthecountofcharacterinvariablecis___new-line_.(对)说明:转义字符以开头,nn必须是8进制数。‘102’可以视为一个字符。21.Theexpression"(x=y=w=0,y=5+w,x=y)"is
7、wrong.。(错)这是一个逗号运算符的题目,逗号运算符具有最低优先级,先计算,后取值。22.Theresultofexpression:x=(i=4,j=16,k=32)is32.(对)23.Theoperandofoperator++/--canbevariablesorconstants.(错)说明:自增自减运算符只能用于变量不能用于常量。例i++,--k(对)3++--6(错)24.The%operatorcannotbeappliedtoafloatordouble.(对)(%是取余数的运算符,只能用在整型数中)25.Commentshavenoe
8、ffecttotheperformanceofpro