C Dissection / Edition 3

C Dissection / Edition 3

by Al Kelley, Ira Pohl
     
 

ISBN-10: 0805331492

ISBN-13: 9780805331493

Pub. Date: 11/30/1995

Publisher: Addison-Wesley

Highlights of the new edition

  • ANSI C used throughout.
  • Thoroughly tested code available via ftp and compatible with most C systems.
  • More extensive coverage of functions and pointers, which are typical stumbling blocks for the beginner.
  • Early coverage of multifile programs enables the programmer to write properly modular code

Overview

Highlights of the new edition

  • ANSI C used throughout.
  • Thoroughly tested code available via ftp and compatible with most C systems.
  • More extensive coverage of functions and pointers, which are typical stumbling blocks for the beginner.
  • Early coverage of multifile programs enables the programmer to write properly modular code and produce and use libraries.
  • Early explanation of simple recursion parallels its early introduction in beginning computer science courses.
  • Greater in-depth treatment of recursion reflects computer scientists' increasing use of C for implementing sophisticated algorithms.
  • Additional coverage of program correctness and type safety.
  • New section on two-dimensional arrays reflects the growing use of C by computer scientists and engineers.
  • New optional "Moving to C++" sections at the end of each chapter offer a preview of the C++ object-oriented extensions of C.


0805331492B04062001

Product Details

ISBN-13:
9780805331493
Publisher:
Addison-Wesley
Publication date:
11/30/1995
Edition description:
Older Edition
Pages:
687
Product dimensions:
7.40(w) x 9.26(h) x 1.12(d)

Table of Contents

(Each chapter contains "Style".)
1. Writing an ANSI C Program.

Getting Ready to Program.
A First Program.
Variables, Expressions, and Assignments.
Initialization.
The Use of #define and #include.
The Use of printf() and scanf()
The while Statement.
Problem Solving: Computing Sums.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

2. Lexical Elements, Operators, and the C System.
Characters and Lexical Elements.
Comments.
Keywords.
Identifiers.
Constants.
String Constants.
Operators and Punctuators.
Precedence and Associativity of Operators.
Increment and Decrement Operators.
Assignment Operators.
An Example: Computing Powers of 2.
The C System.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

3. Flow of Control.
Relational, Equality, and Logical Operators.
Relational Operators and Expressions.
Equality Operators and Expressions.
Logical Operators and Expressions 91 Short-Circuit Evaluation.
The Compound Statement.
The Empty Statement.
The if and if-else Statements.
The while Statement.
Problem Solving: Finding Maximum Values.
The for Statement.
Problem Solving: Combinatorics.
Problem Solving: Boolean Variables.
The Comma Operator.
The do Statement.
The goto Statement.
The break and continue Statements.
The switch Statement.
Nested Flow ofControl.
The Conditional Operator.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

4. Functions and Structured Programming.
Function Invocation.
Function Definition.
The return Statement.
Function Prototypes.
Top-Down Design.
Program Correctness: The assert() Macro.
Function Declarations from the Compiler's Viewpoint.
Problem Solving: Random Numbers.
An Alternate Style for Function Definition Order.
Developing a Large Program.
A Simulation: The Game of Heads or Tails.
Invocation and Call-by-Value.
Recursion.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

5. Character Processing.
The Data Type char.
The Use of getchar() and putchar()
An Example: Capitalize.
The Macros in ctype.h
Problem Solving: Repeating Characters.
Problem Solving: Counting Words.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

6. The Fundamental Data Types.
Declarations and Expressions.
The Fundamental Data Types.
Characters and the Data Type char.
The Data Type int.
The Integral Types short, long, and unsigned.
The Floating Types.
The sizeof Operator.
Mathematical Functions.
Conversions and Casts.
Problem Solving: Computing Interest.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

7. Enumeration Types and typedef.
Enumeration Types.
The Use of typedef.
An Example: The Game of Paper, Rock, Scissors.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

8. Functions, Pointers, and Storage Classes.
Pointer Declaration and Assignment.
Addressing and Dereferencing.
Pointers to void.
Call-by-Reference.
Scope Rules.
Storage Classes.
The Storage Class static.
Static External Variables.
Default Initialization.
An Example: Processing Characters.
Function Declarations and Definitions.
The Type Qualifiers const and volatile.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

9. Arrays and Pointers.
One-Dimensional Arrays.
An Example: Counting Each Letter Separately.
The Relationship Between Arrays and Pointers.
Pointer Arithmetic and Element Size.
Passing Arrays to Functions.
A Sorting Algorithm: Bubble Sort.
Two-Dimensional Arrays.
Multidimensional Arrays.
Dynamic Memory Allocation.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

10. Strings and Pointers.
The End-of-String Sentinel \0
Initialization of Strings.
An Example: Have a Nice Day.
Using Pointers to Process a String.
Problem Solving: Counting Words.
Passing Arguments to main()
String Handling Functions in the Standard Library.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

11. Recursion.
Recursive Problem Solving.
An Example: Drawing Patterns on the Screen.
String Handling Using Recursion.
The Divide-and-Conquer Methodology.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

12. Structures and ADTs.
Declaring Structures.
Accessing a Member.
Operator Precedence and Associativity: A Final Look.
Structures, Functions, and Assignment.
Problem Solving: Student Records.
Initialization of Structures.
The Use of typedef.
Self-Referential Structures.
Linear Linked Lists 429 Dynamic Storage Allocation.
List Operations.
Counting and Lookup.
Insertion and Deletion.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

13. Input/Output and Files.
The Output Function printf()
The Input Function scanf()
The functions sprintf() and sscanf()
The functions fprintf() and fscanf()
Accessing Files.
An Example: Double-Spacing a File.
Using Temporary Files and Graceful Functions.
Accessing a File Randomly.
Style.
Common Programming Errors.
System Considerations.
Moving to C++.

14. Software Tools.
Executing Commands From Within a C Program.
Environment Variables.
The C Compiler.
Creating a Library.
Using the Profiler.
How to Time C Code.
The Use of dbx.
The Use of make.
The Use of touch.
Other Useful Tools.
Style.
Common Programming Errors.
System Considerations.

15. From C to C++.
Object-Oriented Programming.
Why Switch to C++?
Classes and Abstract Data Types.
Overloading.
Constructors and Destructors.
Inheritance.
Polymorphism.
Templates.
C++ Exceptions.
Benefits Of Object-Oriented Programming.
Style.
Common Programming Errors.
System Considerations.

Appendix A. The Standard Library.
Diagnostics:
Character Handling:
Errors:
Floating Limits:
Integral Limits:
Localization:
Mathematics:
Nonlocal Jumps:
Signal Handling:
Variable Arguments:
Common Definitions:
Input/Output:
General Utilities:
Memory and String Handling:
Date and Time:
Miscellaneous.

Appendix B. The Preprocessor.
The Use of #include.
The Use of #define.
Macros With Arguments.
The Use of #undef.
Conditional Compilation.
Predefined Macros.
The Operators # and ##.
The assert() Macro.
The Use of #error and #pragma.
Line Numbers.
Corresponding Functions.

Appendix C. Bitwise Operators.
Bitwise Operators and Expressions.
Masks.
Printing an int Bitwise.
Packing and Unpacking.
Common Programming Errors.
System Considerations.

Appendix D. ANSI C Compared To Traditional C.
Types.
Constants.
Declarations.
Initializations.
Expressions.
Functions.
Conversions.
Array Pointers.
Structures and Unions.
Preprocessor.
Header Files.
Miscellaneous.

Appendix E. ASCII Character Codes.
Appendix F. Operator Precedence and Associativity.
Index.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >