版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
注:不含主觀題第1題判斷題(1分)IntheClanguage,youcanwriteoneormorestatementsonthesameline,butastatementcannotbewrittenondifferentlines.第2題判斷題(1分)ACprogramwillonlyrunfromfunctionmain().第3題判斷題(1分)Clanguagehasnoinput/outputstatement,justinput/outputfunctionsinstead.第4題判斷題(1分)sizeof()isafunction.第5題判斷題(1分)Cprogramconsistsoffunctionsandvariables.第6題單選題(1分)ACprogram,whateveritssize,consistsof____andvariables.AintegerBtextCfunctionsDarray
第7題單選題(1分)InC,whichoneiscorrectasthefollowing?Aintx=3.14Bintx='aa'Cintx=3Dintx="345"第8題單選題(1分)Whichofthefollowingiscorrect?AINTi=0BInti=0Cinti=0DIntegeri=0第9題單選題(1分)Whichofthefollowingislegalcharacterconstant?A'h'B'\x7'C‘\101'D‘\483’第10題單選題(1分)Whichoneisincorrectexpression?Achara='\x2d';
Bchara='\n';Cchara='a';
Dchara="aa";Chapter2UnitQuiz第1題判斷題(1分)Assignmentexpression(賦值表達(dá)式)willbeanassignmentstatementwithasemicolon(';')attheend.第2題判斷題(1分)Theoperandofoperator++/--canbevariablesorconstants.第3題判斷題(1分)Theexpression:k*=n+10equaltoexpression:k=k*(n+10).第4題判斷題(1分)The%operatorcannotbeappliedtoafloatordouble.第5題單選題(1分)Whichoneisincorrectexpression?Achar
a='\x2d';Bchara='\n';
Cchara='a';Dchara="aa";第6題單選題(1分)Writetheresultoffollowingprogram?voidmain(){
floata=3.14;
printf("%f",a);}A3.14B3.140000C3.1D3第7題單選題(1分)Ifx=2.5,y=4.6,therightresultofthefollowingexpressionis
?
x+(int)(x+y)%2A3.500000B3C4.0D5.00第8題單選題(1分)Whatistheresult?#include
<stdio.h>voidmain(){int
a=1,b=0;
printf("%d,",b=a+b);
printf("%d\n",a=2*b);}A1,2B1,0C3,2D0,0第9題單選題(1分)Whichoneiscorrectconstants?A0119
Bo126C2.5e2.5D119LChapter3UnitQuiz第1題判斷題(1分)(x<=y<=z)isClanguageexpressionforrelationshipx≤y≤z.第2題判斷題(1分)Theswitchstatementisamulti-waydecision.第3題判斷題(1分)a==bisthesamemeaningwitha=b.第4題判斷題(1分)Whenais1andbis0,thevalueofa||bistrue.
第5題判斷題(1分)Inthestatementswitch(expression),expressioncanbeanytype.第6題判斷題(1分)Theresultofexpression:8||-2is1.第7題判斷題(1分)InClanguagezeromeanstrueandnozeromeansfalse.第8題單選題(1分)Theresultofthefollowing
programis:#include<stdio.h>voidmain()
{inta=1,b=2,c=3;
if(a>b)printf("a=%d\n",a);
elseprintf("b=%d\n",b);}Ab=2Ba=1Cc=3D0第9題單選題(1分)Resultoffollowingprogramisinta=2,b=-1,c=2;if(a<b)if(b<0)c=0;elsec+=1;printf("%d\n",c);A-1B2C3D0第10題單選題(1分)Resultoffollowingprogramisinta=0,b=0,c=0;if(++a>0||++b>0)++c;
printf("%d,%d,%d\n",a,b,c);A0,0,0
B1,1,1
C1,0,1D1,0,1Chapter4UnitQuiz第1題判斷題(1分)Indo-while,theloopisexecutedatlestonce.第2題判斷題(1分)Thestatement:for(a=0,b=1,i=0;i<=200;i++)iscorrect.第3題判斷題(1分)Inwhilestatement,theloopisexecutedatlestonce.第4題判斷題(1分)Thefor(expression1;expression2;expression3)statement,anyorallofthethreeexpressioncanbeomitted.第5題判斷題(1分)Abreakforcesanimmediateexitfromwhileand
forloopstatements.第6題判斷題(1分)Thecontinueappliestoloopsonly;whenacontinuestatementisencounteredinaloop,thenextiterationoftheloopbeginsimmediately.第7題判斷題(1分)Afterimplementingfollowingprogramthevalueofiis11.i=-1;while(i<10)i+=2;i++;第8題判斷題(1分)Thewhilestatementwillbeimplementedinfinitetimes.
inti=1;while(1)i++;第9題判斷題(1分)Thestatementsinthenestedloopwillbeimplemented15times.
for(i=0;i<5;i+=2)for(j=0;j<5;j++)第10題判斷題(1分)Afterimplementingfollowingprogram,thevalueofiis5.
for(i=1;i++<4;)第11題單選題(1分)whichisincorrectinfollowloopstatment?Afor(i=0,i<10,i++)j++;Bfor(i=0;;i++);Cfor(i=0;i<10;i+=2);
Dfor(i=0,i++;i<10;i++);第12題單選題(1分)Theresultofthefollowingblockofprogramis:
intx=0;
for(i=1;i<4;i++)
x=x+1;
printf("%d,%d",i,x);A0,0
B4,4C4,3D3,3Chapter5UnitQuiz第1題判斷題(1分)Theresultofstrcmp("STUDY","study")is0.第2題判斷題(1分)Supposecodesegment:inta[5]={1,2,3,4};thenthevalueofa[0]is1.第3題判斷題(1分)Supposedeclaration:inta[5];
thenwehavearrayelements:a[1],a[2],a[3],a[4],a[5].第4題判斷題(1分)Array:doubledist[15]
Thenotation(下標(biāo))forthelastelementsisdist[14].第5題判斷題(1分)Anarraystoresagroupofdatawiththesamedatatype第6題判斷題(1分)Thenameofanarrayistheaddressthataccessestothepositionofitsfirstelement.
第7題判斷題(1分)Givenanarraydoublea[4][5],thenumberofelementsinthearrayis9.第8題判斷題(1分)Giveninta[10],wecanusea++.第9題單選題(1分)Readprogramasfollows,thenwritetheresult.____
voidmain(){int
i,x[3][3]={1,2,3,4,5,6,7,8,9};
for(i=0;i<3;i++)
printf(“%d,”,x[i][2-i]);}A357
B347
C358D257
第10題單選題(1分)Readprogramasfollows,thenwritetheresult.____
voidmain(){
char
b[]="Hello,you";b[5]=0;printf(“%s\n”,b);}AHello,youBHelloCHeDyou第11題單選題(1分)Arrayinitialization:intdist[5]={4,3,2,1,0};
Thenwhichofthefollowingis
right?Adist[0]is0
Bdist[1]is0Cdist[4]is0Ddist[3]is0第12題單選題(1分)Writearraydeclarationfornameswith60rows(行),5columns(列).
________Acharnames[5][60]
Bintnames[60,5]Ccharnames[60][5]Dcharnames[60]第13題單選題(1分)Whichoneofthefollowingstatementscancorrectlydefinearrayaandassignvaluetoit?Ainta()(3)={(1,2,3),(2,4,6)}
Binta[2][]={{1,2,3},{4,5,6}};Cinta[][3]={{1,2,3},{4,5,6}};
Dinta(2)()={(1,2,3),(2,4,6)}Chapter6UnitQuiz第1題判斷題(1分)Functionmain()canbeanywhereinCprogram.第2題判斷題(1分)Everyfunctioncanbecalledbyotherfunctions,includefunctionmain().第3題判斷題(1分)ACProgrammustcontainafunctionnamedmain().第4題判斷題(1分)InC,theparametersfordefinitionoffunctionisthe"actualparameters",theparametersforcallthefunctionis"formalparameters".第5題判斷題(1分)Functionmayhasmanyreturnsentences,butonlyonecanbeexecuted.第6題判斷題(1分)Avariabledefinedinthemain()functioniscalledaglobalvariable.第7題判斷題(1分)Ifanarraynameisusedasanargumenttoafunctioncall,thevaluepassedtotheparameteristhefirstelementinthearray.第8題判斷題(1分)InC,acopyofthevaluesoftheargumentsispassedtotheparameters,knownaspassingbyvalue.第9題判斷題(1分)Whenyoupasstheaddressofoneormoreargumentstoafunction,itisknownas"passingbyreference".第10題判斷題(1分)Ifwewanttodefineafucntionnamedasfunwhichhastwointergerarguments,thefunctionheadisfun(intx,y).第11題判斷題(1分)Thereissemiconlon(;)afterafunctionheader.第12題單選題(1分)Readprogramasfollows,thenwritetheresult.____
voidmn();intx=1;voidmain(){inti;for(i=1;i<3;i++)mn();}voidmn(){x=x+1;printf("
%d",x);}A25B2
3C6
2D3
6第13題單選題(1分)Whichofthefollowingfunctiondefinitionsiscorrect?Adoublefun(intx,inty)Bdoublefun(intx;inty)
Cdoublefun(intx,y)Ddoublefun(intx,y;)
第14題單選題(1分)InClanguage,somefunctionsneedsreturnnovalue,whichkeywordsisusedtodenotethis?AvoidBintCfloat
Ddouble第15題單選題(1分)whatfunctionmightbeusedifneedinputstringwithspacefromkeyboard?Agetc()Bgets()Cgetchar()Dscanf()第16題單選題(1分)Theresultofthefollowingprogramis_______。
voidmain(){
inta=2,j;
for(j=0;j<3;j++)printf(“%4d”,f(a));}intf(inta){intb=0;staticintc=3;b++;c++;return(a+b+c);}A777B7
10
13C7
9
11D789第17題單選題(1分)Thefollowingcallstatement
fun(arg1,arg2+arg3,(arg4,arg5));containsthenumberofargumentsforafunctionis().A3B4C5DerrorChapter7UnitQuiz第1題判斷題(1分)Apointercontainstheaddressofavariable.第2題判斷題(1分)InC,*pisapointer.第3題判斷題(1分)Thenameofanarrayisvalueofthefirstelement.第4題單選題(1分)Readprogramasfollows,thenwritetheresult.____
voidmain()
{char
a[10]={9,8,7,6,5,4,3,2,1,0},*p=a+5;printf("%d",*--p);}A4B5C6D7Chapter8UnitQuiz第1題單選題(1分)Writethefunctionheaderforfunctionzero,whichtakesalongintegerarrayparameteraanddoesnotreturnavalue.Avoidzero(longint*a);Bintzero(longint*a);Cvoidzero(intlong*a);
Dvoidzero(intlonga[]);第2題單選題(1分)Theresultforthefollowingprogramis().#include"stdio.h"#definef(x)x*xvoidmain(){
inta=6,b=2,c;c=f(a)/f(b);
printf("%d\n",c);
}A9B18C36D6第3題單選題(1分)Theresultforthefollowingprogramis().
#include"stdio.h"#defineMA(x)x*(x-1)voidmain(){inta=1,b=2;printf("%d\n",MA(1+a+b));
}A5B6C7D8第4題單選題(1分)Ifwewanttodirectiveincludes"stdio.h"inthesourcefile,weuse______.A#import<stdio.h>B#import"stido.h"C#insert<stido.h>D#include<stdio.h>
Chapter9UnitQuiz第1題判斷題(1分)Arraycann'tbethememberofastructure.第2題判斷題(1分)Youcannotcomparestructurevariablesinanifstatement,eveniftheyhavethesamestructuretemplate.第3題判斷題(1分)Eachiteminastructureiscalledastructuremember.第4題判斷題(1分)Astructurevariablecanbeassignedtoanotherstructurevariableofthesametype.第5題判斷題(1分)Provideddefineaenumdatatype:enumColor{red,green,blue}c1;
Thestatement:c1=blackisright.第6題單選題(1分)Giventhedeclaration:
structdata{inta;floatb;};writestatementsthatassign1toaand2.3tob,using____.Athe.operatorBthe->operatorCthe*operator
Doperator,operator第7題單選題(1分)Giventhedeclaration:struct
data
{intyear;intmonth;intday;}workday;thecorrectwaytoaccessthemembermonthis:________.Adata.monthBdata.year.monthCmonthDworkday.month第8題單選題(1分)Inthedefinitionofthefollowingstructure,whichoneiscorrect?Astructstudent{intnum;charname[10];intage;};stu;
Bstruct{intnum;charname[10];intage;}student;structstudentstu;Cstructstudent{intnum;charname[10];intage;}stu;Dstructstudent{intnum;charname[10];intage;};studentstu;第9題單選題(1分)Readthefollowingprogramandchoosecorrectresult:struct
student{longintnum;char
name[20];
char
sex;
char
addr[30];
}a={89031,"LiLin",'M’,"123BeijingRoad"};
voidmain(){
printf("NO.:%ld\nName:%s\nSex:%c\nAddress:%s\n”,a.num,”,,a.sex,a.addr);}ANO.:89031
Name:LiLinSex:MAddress:123BeijingRoadBNO.:89031Li
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 工藝畫制作工沖突管理測試考核試卷含答案
- 美甲師安全理論競賽考核試卷含答案
- 全媒體運營師安全管理考核試卷含答案
- 煙花爆竹工安全知識測試考核試卷含答案
- 橋面系施工培訓(xùn)
- 酒店員工心理健康與援助制度
- 酒店前廳服務(wù)程序制度
- 酒店客房安全檢查制度
- 財務(wù)審計與監(jiān)督制度
- 濟南線下培訓(xùn)班
- 白內(nèi)障疾病教學(xué)案例分析
- 2026中國電信四川公用信息產(chǎn)業(yè)有限責(zé)任公司社會成熟人才招聘備考題庫完整參考答案詳解
- 2026年黃委會事業(yè)單位考試真題
- 供水管網(wǎng)及配套設(shè)施改造工程可行性研究報告
- 2026年及未來5年中國高帶寬存儲器(HBM)行業(yè)市場調(diào)查研究及投資前景展望報告
- 大九九乘法口訣表(可下載打印)
- 金屬非金屬礦山安全操作規(guī)程
- 壓鑄鋁合金熔煉改善
- EVE國服歷史匯編
- 排水管道溝槽土方開挖專項方案
- 室內(nèi)裝飾工程施工組織設(shè)計方案
評論
0/150
提交評論