IINTRooucnoN
lComputersandSystems
l.lThePhysicalComputer
l.2TheOperatingSystem
I.3Languages
l.4WhatYouShouldRemember
l.5Exercises
2ProgramsandPregramming
2.1WhatIsaProgram?
2.2ProblemSpecificationandAnalysis
2.3TheDevelopmentEnvironment
2.4ProgramConstnlction
2.5ProgramExecutionandTesting
2.6WhatYouShouldRemember
2.7Exercises
3FundamentalContepts
3.lPartsofaProgram
3.2TheSimplestProgram
3.3Variables,Input,Output,andSequencing
3.4SimpleCalculations
3.5TheFlowofControl
3.6AskingQoestions:ConditionalStatements
3.7LoopsandRepetition
3.8AnApplication
3.9WhatYouShouldRemember
3.1OExercises
IICONPUTATION
4ObieetsllypeslandExpressions
4.IVariables,Constants,andLiterals
4.2ExpressionsandParseTrees
4.3Arithmetic,Assignment,andCombinationOperators
4.4IncrementandDecrementOperators
4.5RelationalOperators
4.6LogicOperators
4.7AnExample:AVoltageRamp
4.8CaseStudy:UsingaParseTreetoDebug
4.9WhatYouShouldRemember
4.1OExercises
5UsingFunetionsondLibraries
5.lLibraries
5.2UsingLibraries
5.3FunctionTypes
5.4User-DefinedFunctions
5.5MathLibraryApplication:RootsofaQuadraticEquation
5.6WhatYouShouldRemember
5.7Exercises
6MoreRepetitionandDeeision
6.lNewLoops
6.2ApplicationsofLoops
6.3ThenwitchStatement
6.4CountedLoopApplication:IntegrationbySimpson'sRule
6.5SentinelLoopApplication:Interpolation(OptionalTopic)
6.6WhatYouShouldRemember
6.7Exercises
IIIBASICDATATYPES
7UsingNumericlypes
7.1IntegerTypes
7.2Floating-PointTypesinC
7.3ReadingandWritingNumbers
7.4IntegerOperations
7.5MixingTypesinComputationR(AdvancedTopic)
7.6Pseudo-RandomNumbers
7.7Application:AGuessingGame
7.8WhatYouShouldRemember
7.9Exercises
8IheTroublevvithNumbers
8.lFloating-PointComparisons
8.2CalculationEnors(AdvancedTopic)
8.3OptionalApplication:FindingtheRealRoonofanEquation
8.4WhatYouShouldRemember
8.3hxerclses
9ProgramDesign
9.lModularPrograms
9.2CommunicationBetweenFunctions
9.3Declaration-CallConespondence
9.4DataModularity.
9.5FunctionCallGraphs
9.6ProgramDesignandConstruction
9.7WhatYouShouldRemember
9.8Exercises
lOAnIntreduetiontoArroys
l0.lAnays
1O.2UsingAnays
1O.3ParallelArrays
1O.4AnayArgumentsandParameters
1O.5WhatYouShouldRemember
1O.6Exercises
lleharoeterDataondEnumeratiens
11.lRepresentationofCharacters
ll.2InputandOutputwithCharacters
ll.3OoerationsonCharacters(AdvancedTopic)
ll.4CharacterApplication:AnImprovedProcessingLoop
11.5EnumeratedTypes
l1.6WhatYouShouldRemember
11.7Exercises
12AnIntroduetiontoPointers
12.lAFirstLookatPointers
12.2CallbyAddress
12.3Application:TheBisectionMethod(AdvancedTopic)
12.4WhatYouShouldRemember
12.5Exercises
IV5TRUCTUREOOJtTJtmPE5
l3Strings
l3.1StringRepresentation
13.2StringUO
13.3TheStringLibrary
13.4AnaysofStrings
13.5StringProcessingApplications(OptionalTopic)
13.6Application:AGasPressureTable
13.7WhatYouShouldRemember.
13.8Exercises
l45trueturesTypes
14.lDeclarations
14.2OperationsonStrnctures
14.3ADplication:PointsinaRectangle.
14.4A"p"plication:TheMonteCarloMethod(OptionalTopic)
14.5WhatYouShouldRemember
14.6Exercises
155treomsondFiles
15.1StreamsandBuffers
15.2Programmer-DefinedStreams
15.3StreamOutput
15.4StreamInput
15.5EoorsandExceptions
15.6FileApplication:RandomSelectionWithoutReplacement
15.7Application:MeasuringTorque(OptionalTopic)
15.8WhatYouShouldRemember
15.9Exercises
l6SimpleArreyAlgorithms
l6.lSearchinganAoayDataStructure
16.2Application:ScreeningoutFaultyData(OptionalTopic)
16.3SoHingbySelection
16.4WhatYonShouldRemember
16.5Exercises
l7Two-DimensionalArrays
17.1NestedLoops:PrintingaTable
17.2IntroductiontoTwo-DimensionalAnays
17.3Application:Transformationof2DPointCoordinates
17.4Application:ImageProcessing
17.5WhatYouShouldRemember
17.6Exercises
l8CalculetingvrithBits
18.lUnsignedNumbersandHexadecimalNotation
18.2BitwiseOperators
18.3Application:SimpleEncryptionandDecryption
18.4BitfieldTypes
18.5WhatYouShouldRemember
18.6Exercises
VAOVANCfOTECHNI8UE5
l9DynamicArrays
19.lDynamicMemoryAllocation
19.2UsingDynamicArrays:ASimulation
19.3DynamicMatrix:AnAnayofPointers(AdvancedTopic)
19.4WhatYouShouldRemember
19.5Exercises
20WorkingwithPoiners
z0.lPointers-OldandNewIdeas
20.2Application:AMenuofPointerstoFunctions(AdvancedTopic)
20.3UsingPointerswithAnays
20.4InsenionSOH
20.5WhatYouShouldRemember
20.6Exercises
2lReeursion
21.lStorageClasses
21.2TheRun-TimeStack(AdvancedTopic)
21.3IterationandRecursion
21.4ASimpleExampleofRecursion
21.5AMoreComplexExample:BinarySearch
21.6Quicksort
21.7WhatYouShouldRemember
21.8Exercises
22MakingProgramsGenerol
22.1Command-LineArguments
22.2FunctionsasParameters
22.3WhatYouShouldRemember
22.4Exercises
23ModularOrganization
23.lConstructingaModularProgram
23.2ModularApplication:FindingtheRootsofanEquation
23.3WhatYouShouldRemember
23.4Exercises
APPENDIXES
ATheASCIICode
8ThePrecedeneeofOperotorsinC
CKeywrds
DAdvoneedAspeetsofCOperotors
D.lAssignmentCombinationOperators
D.2MoreonLazyEvaluationandSkipping
D.3TheConditionalOperator
D.4TheCommaOperator
D.5Summary
ENumberRepresentotionandConversien
E.lNumberSystemsandNumberRepresentation
E.2SignedandUnsignedIntegers
E.3RepresentationofRealNumbers
E.4BaseConversion
E.5Self-TestExercises
FThetoolsLibrary
F.1UsingthetoolsLibraryinaProgram
F.2PonabilityCommand
F.3FunctionsDeclaredintools.handDefinedintoole.c
F.4ProcessandStreamManagement'
F.5TimeandDateFunctions
F.6NumericFunctions
F.7StringsandMenus
GtheStondordCEnvironment
G.lBuilt-inFacilities
G.2StandardFilesofConstants
G.3TheStandardLibrariesandmain()
G.4LibrariesNotExplored
HGlossary
IAnswerstoSelf-lestExereises
Index