资源描述:
《★★★c语言年月冲刺复习资料-c语言笔试.doc( c language in march sprint review -c language written in.doc)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、★★★c语言09年3月冲刺复习资料-c语言笔试.doc(ClanguageinMarch09sprintreview-clanguagewrittenin.Doc)ThemostimportantknowledgeofClanguagereviewmaterialsOnthewhole,itmustbeclear:1)therearethreekindsofprogramstructures:sequentialstructure,cyclicstructure(threecyclicstructure),selectionstructure(ifandswit
2、ch)2)readtheprogramfromthemain()entry,andthenreaddownfromthetoporder(hitthecycletodothecycle,hitthechoicetochoose).3)thedatastoredinthecomputerisinbinaryform.Thelocationofthedataishisaddress4)bitisabitfor0or1.Byteisabyte,abyte=eightbits5)mustrememberhowbinaryintoadecimal.Theconceptis
3、oftentested:1,compilerpreprocessingisnotpartoftheClanguage,doesnotaccountforrunningtime,donotaddasemicolon.Cprogramminglanguagecompilercalledthesourceprogram,itisstoredinatextfilewithASCIIvalue.Mainfunction2,eachClanguageprogramisoneandonlyone.3,thefunctioncannotbedefinedfunction.4,t
4、healgorithmistohaveoutput,hecannotenter.5,breakcanbeusedintheloopstructureandtheswitchstatement.6.Thecommaoperatorhasthelowestlevel.Chapterone1)legaluseridentifiertest:Thelegalrequirementiscomposedofletters,numbers,underscores.Otherelementsarewrong.Andthefirstonemustbealetterortheund
5、erscore.Thefirstnumberiswrong.Keywordsshouldnotbeusedasasymbolfortheuser.Maindefinescanfprintfisnotakeyword.WhereIfisthepuzzleyoucandofortheuseridentifier.BecausethefirstletterIfinthecapital,soitisnotakeyword.2)thelegalformofrealdata:2.333e-1islegal,andthedatais2.333*10-1.Thetestform
6、ula:beforeeewillebeanintegernumber..3)thelegalformofcharacterdata::'1'isabyteofcharacter,and"1"isastringoftwobytes(containinganendsymbol).ASCII'0'valueto48,ASCIIvalueof'a'is97,ASCIIvalue'A'is65.Thegeneralexaminationrepresentsasinglecharactererrorform:'65'1"Thecharacteriscanperformari
7、thmetic,remember:'0'-0=48Methodsofconversionbetweenuppercaseandlowercaseletters:'A'+32='a'isgenerally32difference.4)theintegerisgenerallytwobytes,thecharactertypeisabyte,andthedoubleprecisionisgenerally4bytes:Thetestusuallysaid,inthe16or32bitcompilersystemsystem.Inthiscase,donotworry
8、,dothesame.G