欢迎来到天天文库
浏览记录
ID:34231916
大小:278.69 KB
页数:85页
时间:2019-03-04
《Programming in C.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、OxfordUniversityComputingServicesProgramminginCLanguagesl9.2/2TypographicalConventionsListedbelowarethetypographicalconventionsusedinthisguide.Namesofkeysonthekeyboardareenclosedinanglebrackets;forexamplerepresentstheEnter(orReturn)key.Twokeynamesenclosedinanglebracketsan
2、dseparatedbyaslash(forexample,)indicatethatthefirstkeyshouldbehelddownwhilethesecondispressed;bothkeyscanthenbereleasedtogether.Wheretwoormorekeysareeachenclosedinseparateanglebrackets(forexample,)eachkeyinthesequenceshouldbepressedinturn.Characterst
3、ypedinbytheuserareinlower-casenon-boldcharactersintypewriterfont.Otheroptionsandbuttonnamesareshowninlower-casenon-boldcharactersintypewriterfont.Pull-downmenuoptionsareindicatedbythenameoftheoptionenclosedinsquarebrackets,forexample[File/Print].Toselecttheoption[Print]fromthe[F
4、ile]menu:clickwiththemousebuttononthe[File]menuname;movethecursorto[Print];when[Print]ishighlighted,clickthemousebuttonagain.Wheremenuitemsorlargesectionsofoutputareincluded,theyareshownastheywouldbedisplayedonthescreen.Sectionsmarkedwitha‡aremoreadvancedandcanbeomittedonafirstr
5、eading.ProgramminginCl9.2/2Contents1Introduction11.1AboutthisUserguide11.2WhyuseC?12AnExampleCProgram23VariablesandExpressions33.1VariableDeclaration33.2VariableTypes33.3VariableNames43.4Assignment53.5ArithmeticOperators63.6IncrementandDecrementOperators73.7CastOperators73.8Bitw
6、iseOperators‡73.9PromotionsandConversions‡83.10ParsingRules‡103.11SymbolicConstantsandThePreprocessor114InputandOutput114.1FormattedOutput—printf114.2ConversionSpecifiers124.3LiteralConstants134.4FormattedInput—scanf154.5CharacterI/O—getchar&putchar164.6End-of-File175FlowofContr
7、ol175.1RelationalandLogicalOperators175.2ConditionalBranching—if185.3ConditionalSelection—switch195.4Iteration—while,for205.5LocalJumps—goto‡215.6ShortCircuitBehaviour‡225.7Problems225.8DeclaringArrayVariables235.9InitialisingArrayVariables246Functions256.1BuildingBlocksofProgra
8、ms256.2ReturnValue256.3FunctionParameters25Octo
此文档下载收益归作者所有