C Primer Plus_Sixth Edition(第六版原著高清非扫描)
Developer'sLibrary
ESSENTIALREFERENCESFORPROGRAMMINGPROFESSIONALS
Developer'sLihrarybooksaredesignedtoprovidepracticingprogrammerswithunique,
high-qualityreferencesandtutorialsontheprogramminglanguagesandtechnologies
theyuseintheirdailywork
allbooksintheDeveloper'sLibraryarewrittenbyexperttechnologypractitionerswho
areespeciallyskilledatorganizingandpresentinginformationinawaythat'suseful
forotherprogrammers
Keytitlesincludesomeofthebest,mostwidelyacclaimedbookswithintheir
topicareas
PHPmysQlwebDevelopment
PythonEssentialReference
LukewellinglauraThomson
Davidbeazley
ISBN978-0-672-32916-6
ISBN-13:978-0-672-32978-4
MySOI
PostgresQl
Pauldubois
Korrydouglas
ISBN-13:9780-321-83387-7
ISBN-13:978-0-672-32756-8
LinuxKernelDeveloprment
C++Primerplus
Robertlove
Steph
ISBN-13:978-0-672-32946-3
ISBN-13:978-0-321-77640-2
Developerslibrarybooksareavailableinprintandinclectronicformatsatmostrtai
andonlinebookstores,aswellasbysubscriptionfromSafariBooksOnlineatsafari
informit.com
Developers
Library
informit.com/devlibrary
CPrimerplus
Sixthedition
StephenPrata
AAddison-Wesley
UpperSaddleriver,NJ·Boston·Indianapolis·Sanfrancisco
Newyork·Toronto·Montreal·London·Munich·Paris·Madrid
CapeTown.Sydney·Tokyo·Singapore·MexicoCity
CPrimerplus
AcquisitionsEditor
Sixthedition
Marktaber
Copyrighto2014byPearsonEducation,Inc
ManagingEditor
Allrightsreserved.Nopartofthisbookshallbereproduced,storedinaretrieval
Sandraschroedel
system,ortransmittedbyanymeans,electronic,mechanical,photocopying,recording,or
ProjectEditor
otherwise,withoutwrittenpermissiontromthepublisher.Nopatentliabilityisassumed
Mandiefrank
withrespecttotheuseoftheinformationcontainedhereinalthougheveryprecaution
hasbeentakeninthepreparationofthisbook,thepublisherandauthorassumeno
CopyEditor
responsibilityforerrorsoromissions.Norisanyliabilityassumedfordamagesresulting
GenelBreeze
fromtheuseoftheinformationcontainedherein
Indexer
JohnnavanHoose
sBN-13:9780-321928429
SBN10:0321928423
Jessdegabriele
LibraryofCongressCantrolNumber:2013953007
Technicaleditor
Dannykalev
Printedintheunitedstatesofamerica
Publishing
FirstPrinting:December2013
Coordinator
Vanessaevans
Trademarks
Alltermsmentionedinthisbookthatareknowntobetrademarksorservicemarkshave
Designer
beenappropriatelycapitalized.Pearsoncannotattesttotheaccuracyofthisinformation
ChutiPrasertsith
Useofaterminthisbookshouldnotberegardedasaffectingthevalidityofany
Pagelayout
trademarkorservicemark
Jakemcfarland
WarningandDisclaimer
Everyeftorthasbeenmadetomakethisbookascompleteandasaccurateaspossible.
butnowarrantyorfitnessisimplied.theinformationprovidedisonan"asis"basis
Bulksales
Pearsonoffersexcellentdiscountsonthisbookwhenorderedinquantityforbulk
purchasesorspecialsales.Formoreinformationpleasecontact
U.S.Corporateandgovernmentsales
1-800-3823419
corpsales@pearsontechgroup.com
ForsalesoutsideoftheU.s.,pleasecontact
InternationalSales
international@pearsonedcom
Contentsataglance
Prefacexxvii
1GettingReady1
2IntroducingC27
3Dataand
55
4CharacterStringsandFormattedInput/Output99
5Operators,Expressions,andstatements143
6CControlStatements:Looping189
7CControlStatements:BranchingandJumps245
8CharacterInput/OutputandInputValidation299
9Functions335
10ArraysandPointers383
11CharacterStringsandstringFunctions441
12StorageClasses,Linkage,andMemoryManagement511
13FileInput/output565
14Structuresandotherdataforms601
15BitFiddling673
16TheCPreprocessorandtheCLibrary711
17AdvancedDataRepresentation773
Appendixes
AAnswerstotheReviewquestions861
BReferencesection905
Index1005
Tableofcontents
Prefacexxvii
1GettingReady1
Whencec?1
hyc?2
DesignFeatures2
Efficiency
3
Portability
PowerandFlexibility3
ProgrammerOriented3
Shortcomings4
Whitherc?4
WhatComputersDo5
High-levelComputerLanguagesandCompilers6
LanguageStandards7
TheFirstANSI/IsoCStandard8
Thec99Standard8
Thec11standard9
UsingC:SevenSteps9
Step1:DefinetheProgramObjectives10
Step2:DesigntheProgram10
Step3:WritetheCode11
Step4:Compile11
Step5:RuntheProgram12
Step6:TestandDebugtheProgram12
Step7:MaintainandModifytheProgram13
ry13
ProgrammingMechanics13
ObjectCodeFiles,ExecutableFiles,andLibraries14
UnixSystem16
TheGNUCompilerCollectionandtheLLVMProject18
LinuxSystems18
Command-LineCompilersforthePc19
IntegratedDevelopmentEnvironments(Windows)19
TheWindows/LinuxOption21
Conthemacintosh21
HowThisBookIsOrganized22
Conventionsusedinthisbook22
T
22
ProgramOutput23
SpecialElements24
Summary24
ReviewQuestions25
Prc
ngEXercise25
2Introducing27
ASimpleExampleofC27
TheExampleExplained28
Pass1:QuickSynopsis30
Pass2:ProgramDetails31
TheStructureofaSimpleProgram40
TipsonMakingYourProgramsReadable41
TakingAnotherStepinUsingC42
Documentation43
MultipleDeclarations43
Multiplication43
PrintingMultipleValues43
WhileYou'reatIt--MultipleFunctions44
ntroducingDebugging46
SyntaxErrors46
SemanticErrors47
ProgramState49
KeywordsandReservedIdentifiers49
KeyConcepts50
mary51
ReviewQuestions51
ProgrammingExercises53
3Dataandc55
ASampleprogram55
What'sNewinThisProgram?57
Datavariablesandconstants59
Data:Data-TypeKeywords59
ntegerVersusFloating-PointTypes60
Contents
TheInte
61
Thefloating-PointNumber61
BasicCDataTypes6
TheintType62
OtherIntegerTypes66
UsingCharacters:Typechar71
TheBoolType77
PortableTypes:stdint.handintt
h77
Typesfloat,double,andlongdouble79
ComplexandImaginaryTypes85
beyondthebasictypes85
TypeSizes87
UsingDataTypes88
ArgumentsandPitfalls89
OneMoreExample:EscapeSequences91
WhatHappensWhentheProgramRuns91
FlushingtheOutput92
KeyConcepts93
Summary93
ReviewQuestions94
ProgrammingEXercises97
4CharacterStringsandFormattedInput/output99
IntroductoryProgram99
CharacterStrings:AnIntroduction101
TypecharArraysandtheNullCharacter101
102
Thestrlen()Function103
ConstantsandthecPreprocessor106
Theconstmodifier109
Manifestconstantsonthejob109
ExploringandExploitingprintf(andscanf()112
Theprintf(Function112
Usingprintf()113
ConversionSpecificationModifiersforprintf(115
WhatDoesaConversionSpecificationConvert?122
Usingscanf()128
Contents
TheModifierwithprintf(andscanf()133
UsageTipsforprintf()135
Keyconcepts136
ry137
ReviewQuestions138
ProgrammingExercises140
5Operators,Expressions,andStatements143
IntroducingLoops144
FundamentalOperators146
AssignmentOperator:=146
AdditionOperator:+149
SubtractionOperator:-149
SignOperators:-and+150
MultiplicationOperator:151
DivisionOperator:/153
OperatorPrecedence154
Precedenceandtheorderofevaluation156
SomeAdditionalOperators157
ThesizeofOperatorandthesizetType158
ModulusOperator:%159
IncrementandDecrementOperators:++and
160
Decrementing
164
Precedence165
DontBetooclever166
Expressionsandstatements167
Expressions167
Statements168
Compoundstatements(Blocks)171
TypeConversions174
TheCastOperator176
FunctionwithArguments177
ASampleProgram180
ts182
Summary182
ReviewQuestions183
ProgrammingExercises187
用户评论