c语言题库判断河南工业大学 河工大 c语言期末考试题库C language question.docx
- 文档编号:4482744
- 上传时间:2022-12-01
- 格式:DOCX
- 页数:11
- 大小:17.79KB
c语言题库判断河南工业大学 河工大 c语言期末考试题库C language question.docx
《c语言题库判断河南工业大学 河工大 c语言期末考试题库C language question.docx》由会员分享,可在线阅读,更多相关《c语言题库判断河南工业大学 河工大 c语言期末考试题库C language question.docx(11页珍藏版)》请在冰豆网上搜索。
c语言题库判断河南工业大学河工大c语言期末考试题库Clanguagequestion
c语言题库(判断)河南工业大学河工大c语言期末考试题库(Clanguagequestionbank(judgment),HenanUniversityofTechnologyClanguagefinalexaminationquestionsbank)
~~~1
Alltheoperationsofacomputerarecontrolledbytheprogram.Withouttheprogram,thecomputerwillaccomplishnothing.
~y
~~~1
Aprogramisasetofinstructionsthatacomputercanrecognizeandexecute.
~y
~~~1
Sincecomputerscanrecognizeandacceptmachineinstructionsdirectly,machinelanguageisthemostsuitablelanguageforpeopletoprogram.
~n
~~~1
Acompilercanconvertprogramswritteninhigh-levellanguageintomachineinstructions.
~y
~~~1
Ingeneral,werefertoprogramswritteninhigh-levellanguagesasobjectprograms.
~n
~~~1
Beforeyoucangenerateexecutableprograms,youshouldcompileandconnectagain.
~y
~~~1
Thereasonforhigh-levellanguageisthatitcanbewritteninaprogramthatdoesnotfollowanyform.
~n
~~~1
Cprogramminglanguagefreedomislarge,soitbelongstounstructuredlanguage.
~n
~~~1
TheClanguageisahigh-levellanguagethatdoesnotallowdirectaccesstophysicaladdresses.
~n
~~~1
FunctionsareamajorpartofaCprogram.
~y
~~~3
IfyouusetheTC2.0compiler,thecompilationsystemisassigned2,1,and4bytestoint,char,andfloat
~y
~~~3
Thefollowingarevalidvariablenames:
day,sum,and_pint
~y
~~~3
Ifcharcisdefined,thenc="C"";
~n
~~~3
TheClanguagecanuseasymbolicnametorepresentaconstant
~y
~~~3
Thefollowingproceduressegmentfloatx=3.6;inti;i=(int)x;thenx=3,i=3
~n
~~~3
IntheClanguage,characterdatacanbearithmeticoperationswithintegerdata
~y
~~~3
Theaccuracycanbespecifiedwhenusingscanftoenterdata
~n
~~~3
InC(+,-)operatorcanonlybeusedforvariable
~y
~~~3
Thefloata=b=c=1.0iscorrectintheClanguage
~n
~~~3
Inputchar(c),Ccanbeanescapecharacter
~y
~~~4
Theifstatement,whetherwrittenonafewlines,isawholeandbelongstothesamestatement.
~y
~~~4
Theentireifstatementcanbewrittenonmultiplelinesorwrittenonasingleline.
~y
~~~4
Intheifstatement,ifmusthaveelse.
~n
~~~4
Intheifstatement,elsemusthaveif.
~y
~~~4
Theelseclausecannotbeusedaloneasastatement,andmustbepairedwithif.
~y
~~~4
IntheClanguagecompilingsystem,whentheresultoflogicaloperationsisexpressed,thevalue"1"standsfor"truth",and"0"means"false"".
~y
~~~4
Arithmeticoperatorshaveprecedenceoverrelationaloperators.
~y
~~~4
Logicisnotthehighestpriorityinlogicaloperators.
~y
~~~4
Theswitchstatementisamultibranchselectionstatement.
~y
~~~4
Injudgingwhetheraquantityistrue,0represents"false",and"0"standsfor"true"".
~y
~~~5
IntheClanguage,3statementsthatimplementtheloopstructurearetheforstatement,thewhilestatement,andtheDO-WHILEstatement.
~y
~~~5
For((.))andwhile
(1)areinfiniteloops.
~y
~~~5
InC,thewhilestatementsthatimplementloopstructuresareexactlyequivalenttotheDO-WHILEstatements.
~n
~~~5
Theexecutionstatementfor(i=1;i++<4;);thevalueofthelattervariableIis4
~n
~~~5
Theforstatementcanonlybeusedincaseswherethenumberofcycleshasbeendetermined.
~n
~~~5
Theexistingdefinitionofintk=1;executesthestatementwhile(++k<4);then,thevalueofKis4
~y.
~~~5
#include
~y
~~~5
Ints=36;while(s)--s;constitutesadeadloop.
~n
~~~5
Programsegmentint=0;while(t=1){printf("%d\n","t");}atruntime,theprintfstatementexecutes0times.
~n
~~~5
Program#include,
~y
~~~6
Whendefininganarray,anarraysubscriptcanberepresentedbyavariable
~n
~~~6
Whenreferencingelementsinanarray,thearraysubscriptcanberepresentedbyavariable
~y
~~~6
Inta[8];definesanintegerarray;thelastelementinthearrayisa[8]
~n
~~~6
Inta[6];definesanintegerarray;thefirstelementinthearrayisa[1]
~n
~~~6
Inta[2][3];definesanarrayinwhichthereare6elementsinthearray
~y
~~~6
Supposethats[10]isanarrayofcharacters,byscanf("%d","s");youcanenterastringtothearray
~y
~~~6
Inta[6]={0};definesanarraya,andtheinitialvalueofeachelementinthearrayis0
~y
~~~6
Int,a[2][3]={{1},{2},{3}};thecorrectmethodofinitialvaluesforanarray
~y
~~~6
Comparethesizeoftwostrings,andyoucanusethestrcpyfunction
~n
~~~6
Toconnecttwostrings,youcanusethestrcatfunction
~y
~~~6
Totestthelengthofastring,youcanusethestrlenfunction
~y
~~~7
Ifthedefinitionofthecallfunctionappearsbeforethemainfunction,youdonothavetodeclareit.
~y
~~~7
TheClanguagecannotdefinefunctionsnested,norcannestedfunctionsbecalled.Thatistosay,nofunctioncanbecalledintheprocessofinvokingafunction
~n
~~~7
Thevariablesdefinedintheprimaryfunctionarealsovalidonlyintheprimaryfunction,notintheentirefileorprogrambecausetheyaredefinedinthemainfunction.Themainfunctioncannotusevariablesdefinedinotherfunctions.
~y
~~~7
Variablesindifferentfunctionscanusethesamename.Theyrepresentdifferentobjectsanddonotinterferewitheachother.
~y
~~~7
Withinafunction,variablescanbedefinedincompoundstatements,whicharevalidonlyinthecompoundstatement,whichisalsocalledasubprogramorablockofprograms".
~y
~~~7
Thevariablesdefinedinafunctionareexternalvariables,andvariablesdefinedoutsidethefunctionarecalledlocalvariables,andtheexternalvariablesareglobalvariables(alsoknownaswholevariables).
~n
~~~7
Localvariablescanbesharedbyotherfunctionsinthisdocument.Itsrangeofvaliditystartsfromthelocationofthedefinedvariabletotheendofthesourcefile.
~n
~~~7
Itcanbedividedintostaticstoragemodeanddynamicstoragemodefromthepointofviewoftheexistenceofvariablevalue.
~y
~~~7
Theso-calleddynamicstoragemeanswhentheprogramisrunning,thesystemallocatesafixedstoragespace.
~n
~~~7
Staticstorageisthewaytodynamicallyallocatestoragespaceasneededduringprogramexecution.
~n
~~~7
InC,ifapointervariableisusedtocallanargument,thepointervariableisdetermined,pointingtoadefinedcell.
~y
~~~7
IntheClanguage,thecallofafunctioncanonlygetareturnvalue,andthepointercanbeusedasafunctionparametertoobtainmultiplevalues.
~y
~~~7
InClanguage,inputandoutputstatementsareusedtoinputandoutputdata.
~n
~~~7
Whenusingtheputcharfunction,youmustincludetheheaderfilestdio.hbefore.
~y
~~~7
Usingtheputcharfunction,youcanoutputastringtotheterminal.
~n
~~~7
Usingtheprintffunction,youcanoutputbyacertainnumberofdigits.
~y
~~~7
Intheprintffunction,both%cand%scanoutputstrings.
~n
~~~7
Whenyouenterdataintoadefinedvariablewiththescanffunction,youmustadd&.
~y
~~~7
Whendataisenteredintoadefinedvariableusingthescanffunction,thedatainputendswhenanillegalinputisentered.
~y
~~~7
Theuseofinputandoutputfunctions,putchar(getchar()),statementsarewrong(correct).
~n
~~~8
Thepointertothearrayelementistheaddressoftheindexgroupelement.
~y
~~~8
TheprogramforexchangingtwopointervariablesP1andP2istemp=*p1;*p1=*p2;*p2=temp;
~n
~~~8
Printf("%d","a[i]")playsthesameroleasprintf("%d","*"(a+i)),andtheformerisefficient.
~n
~~~8
Thearraynameoftheparameterisnotanationaladdress,butishandledbypointervariables.
~y
~~~8
Thepointertothefunctionthatdefinestheformatisint*p(int,int);.
~n
~~~8
Theprogramsegmentsint,*p,a=2;p=&a;printf("%d",*(p++));theoutputis2
~y.
~~~8
InC99,youcandefinepointervariablesofthebasetypeofvoid,whichcanpointtoanytypeofvariable.
~n
~~~8
TheprogramsegmentthatpointsPtothestring"China"ischar*p;p="China"";
~y
~~~8
Programsegmentsareint,a,m=4,n=6,*p1=&m,*p2=&n,a=(*p1)/(*p2)+5;afterexecution,thevalueofais5
~y
~~~8
Voidf(int*n){while((*n)-(printf);"%d"++(*n));}(main){inta=1;f(&a);}nooutput
~n
~~~9
TheClanguageallowsuserstobuildtheirowncompositedatastructurescomposedofdifferenttypesofdata,calledstructures.
~y
~~~9
Thenameofthestructtypeisthenameofthestruct.
~n
~~~9
Whendefiningastruct,thetypeofamembermustbespecified,eitherasasimpledatatypeorasaconstructeddatatype.
~y
~~~9
Iftheprogramcontainsthestructtype,thenameofthestructmembercannotbethesameasthevariablenameintheprogram.
~n
~~~9
Membersofstructuralvariablescanperformvariousoperationsjustlikenormalvariables.
~y
~~~9
Eachelementofanarrayinanarrayofstructuresisofthesametype,andcanperforminputandoutputoperationsoneacharrayelementasawhole.
~n
~~~10
Thefileidentifiercontainsthreeparts,
Filepath,filename,trunk,andfilesuffix.Thenamingruleofafilenamefollowsthenamingruleofanidentifier.Thesuffixisusedtorepresentthenatureofafile,consistingof3letters.
~n
~~~10
Accordingtotheorganizationofdata,datafilesaredividedintoASC||files(textfiles)andbinaryfiles(imagefiles),andASC||filessavestoragespacethanbinaryfiles.
~n
~~~10
Inthebufferfilesystem,eachusingthefilehasacorrespondingfileinformationinmemory,andthefileassociatedwiththefilepointertothefileinformationandita
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- c语言题库判断河南工业大学 河工大 c语言期末考试题库C language question 语言 题库 判断 河南 工业大学 河工 期末考试
![提示](https://static.bdocx.com/images/bang_tan.gif)
链接地址:https://www.bdocx.com/doc/4482744.html