资源描述:
《c语言中英文翻译资料》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、TheCProgrammingLanguageCisahigh-levelprogramminglanguagedevelopedbyDennisRitchieandBrianKernighanatBellLabsinthemid-1970s.Althoughoriginallydesignedasasystemsprogramminglanguage,Chasprovedtobeapowerfulandflexiblelanguagethatcanbeusedforavarietyofapplicati
2、ons,frombusinessprogramstoengineering.Cisaparticularlypopularlanguageforpersonalcomputerprogrammersbecauseitisrelativelysmall-itrequireslessmemorythanotherlanguages.ThefirstmajorprogramwritteninCwastheUNIXoperatingsystem;andformanyyears,Cwasconsideredtobe
3、inextricablylinkedwithUNIX.Now,however,CisamimportantlanguageindependentofUNIX.Althoughitisahigh-levellanguages,Cismuchclosertoassemblylanguagethanaremostotherhigh-levellanguages.ThisclosenesstotheunderlyingmachinelanguageallowsCprogrammerstowriteveryeffi
4、cientcode.Thehow-levelnatureofC,however,canmakethelanguagedifficulttouseforsometypesofapplications.Nowlet’stakeanoverviewoftheCprogramminglanguage,bothhistoricallyandtechnicallyandtechnically.Asageneral-purposeprogramminglanguage,Chasbeencloselyassociated
5、withUNIXsystemwhereitwasdeveloped,sinceboththesystemandmostoftheapplicationsthatrunonitarewritteninC.Thelanguage,however,isnottiedtoanyoneoperatingsystemormachine;andalthoughithasbeencalleda“systemprogramminglanguage”becauseitisusefulforwritingcompilersan
6、doperatingsystems,ithasbeenusedequallywelltowritemajorprogramsinvariousfields.ManyoftheimportantideasstemfromthelanguageBCPL,developedbyMartinRichards.TheinfluenceofBCPLonCproceededindirectlythroughthelanguageB,whichwaswrittenbyKenTompsonin1970forthefirst
7、UNIXsystemontheDEC-PDP-7.BCPLandBare“typeless”languages.Bycontrast,Cprovidesavarietyofdatatypes.Thefundamentaltypesarecharacters,andintegersandfloatingpointnumbersofseveralsizes.Additionally,thereisahierarchyofderiveddatatypescreatedwithpointers,arrays,st
8、ructures,andunions.Expressionsareformedfromoperands;anyexpression,includinganassignmentorafunctioncall,canbeastatement.Pointersprovideformachine-independentaddressarithmetic.Cprovidesthefundamentalcontrol-flowconstr