Stephen G. Kochan撰写及合作撰写了六本经典的程序设计与Unix书籍,包括Unix Shell Programming和Programming in Objective-C。他曾任AT&T贝尔实验室的软件顾问,从事Unix和C程序设计的开发与授课工作。
目錄:
目录Introduction1 Some FundamentalsProgrammingHigher-Level LanguagesOperating SystemsCompiling ProgramsIntegrated Development EnvironmentsLanguage Interpreters2 Compiling and Running Your First ProgramCompiling Your ProgramRunning Your ProgramUnderstanding Your First ProgramDisplaying the Values of VariablesCommentsExercises3 Variables, Data Types, and Arithmetic ExpressionsUnderstanding Data Types and ConstantsThe Integer Type intThe Floating Number Type floatThe Extended Precision Type doubleThe Single Character Type charThe Boolean Data Type _BoolType Specifiers: long , long long , short , unsigned , and signedWorking with VariablesWorking with Arithmetic ExpressionsInteger Arithmetic and the Unary Minus OperatorCombining Operations with Assignment: The Assignment OperatorsTypes _Complex and _ImaginaryExercises4 Program LoopingTriangular NumbersThe for StatementRelational OperatorsAligning OutputProgram InputNested for Loopsfor Loop VariantsThe while StatementThe do StatementThe break StatementThe continue StatementExercises5 Making DecisionsThe if StatementThe if-else ConstructCompound Relational TestsNested if StatementsThe else if ConstructThe switch StatementBoolean VariablesThe Conditional OperatorExercises6 Working with ArraysDefining an ArrayUsing Array Elements as CountersGenerating Fibonacci NumbersUsing an Array to Generate Prime NumbersInitializing ArraysCharacter ArraysBase Conversion Using ArraysThe const QualifierMultidimensional ArraysVariable Length ArraysExercises7 Working with FunctionsDefining a FunctionArguments and Local VariablesFunction Prototype DeclarationAutomatic Local VariablesReturning Function ResultsFunctions Calling Functions Calling...Declaring Return Types and Argument TypesChecking Function ArgumentsTop-Down ProgrammingFunctions and ArraysAssignment OperatorsSorting ArraysMultidimensional ArraysGlobal VariablesAutomatic and Static VariablesRecursive FunctionsExercises8 Working with StructuresThe Basics of StructuresA Structure for Storing the DateUsing Structures in ExpressionsFunctions and StructuresA Structure for Storing the TimeInitializing StructuresCompound LiteralsArrays of StructuresStructures Containing StructuresStructures Containing ArraysStructure VariantsExercises9 Character StringsRevisiting the Basics of StringsArrays of CharactersVariable-Length Character StringsInitializing and Displaying Character StringsTesting Two Character Strings for EqualityInputting Character StringsSingle-Character InputThe Null StringEscape CharactersMore on Constant StringsCharacter Strings, Structures, and ArraysA Better Search MethodCharacter OperationsExercises10 PointersPointers and IndirectionDefining a Pointer VariableUsing Pointers in ExpressionsWorking with Pointers and StructuresStructures Containing PointersLinked ListsThe Keyword const and PointersPointers and FunctionsPointers and ArraysA Slight Digression About Program OptimizationIs It an Array or Is It a Pointer?Pointers to Character StringsConstant Character Strings and PointersThe Increment and Decrement Operators RevisitedOperations on PointersPointers to FunctionsPointers and Memory AddressesExercises11 Operations on BitsThe Basics of BitsBit OperatorsThe Bitwise AND OperatorThe Bitwise Inclusive-OR OperatorThe Bitwise Exclusive-OR OperatorThe Ones Complement OperatorThe Left Shift OperatorThe Right Shift OperatorA Shift FunctionRotating BitsBit FieldsExercises12 The PreprocessorThe #define StatementProgram ExtendabilityProgram PortabilityMore Advanced Types of DefinitionsThe # OperatorThe ## OperatorThe #include StatementSystem Include FilesConditional CompilationThe #ifdef, #endif, #else, and #ifndef StatementsThe #if and #elif Preprocessor StatementsThe #undef StatementExercises13 Extending Data Types with the Enumerated Data Type, Type Definitions, and Data Type ConversionsEnumerated Data TypesThe typedef StatementData Type ConversionsSign Extension