Efficient C programming: a practical approach

M. Weiss
1995-01-05
Abstract:(Note: each chapter ends with exercises. I. BASIC C. 1. A General Overview. History. The Environment. Basic C. Functions. Arrays. Strings. Structures. Pointers. Files. Summary and book organization. 2. Simple Straightline C. The first program. Tokens and white space. Comments. #include statements. Identifiers. #define statements. Objects and declarations. Integer types and integer constants. Floating-point types and constants. The typedef statement. The sizeof operator. String constants. main. printf. Expressions and simple statements. Assignment Operators. Unary operators. Type conversions. Bitwise operators. scanf. Summary. 3. Decisions, Decisions, Decisions. Relational and equality operators. Logical operators. Conditional statements. Loops. The switch statement. Occasionally useful stuff. Recurring case study: Part I. Summary. 4. Functions. The parts of a function. Splitting it up. Functions as paramenters. Storage classes. The return value of main. Rucursion. Recurring case study: Part 2. Summary. 5. The Preprocessor. Overview. Simple textual substitution via #define. Parameterized macros. #undef and redefinition of macros. The #include statement. Conditional compilation. Miscellaneous directives. Summary. II. EFFICIENT C: DATA STRUCTURES AND ALGORITHMS. 6. Pointers. The pointer variable. The address-of operator &. Pointer syntax. The const qualifier with pointers. Call by reference. The generic pointer void *. Pointers to functions. Summary. 7. Arrays. Basics. Limitations and technicalities of arrays. Passing arrays as parameters. The typedef statement revisited. Shellsort: A simple, but faster sorting algorithm. Multidimensional arrays. Enumerated types: enum. The sizeoff operator revisited. Dynamic allocation of arrays. Pointer arithmetic. Recurring case study: Part 3. Summary. 8. Characters and Strings. The char type. A char is a small integer. Special character routines and ctype.h. Single-character I/O. The string abstraction. printf and scanf. String operations. Pointers and strings. Additional string routines. A common pointer error. sscanf and sprintf. Case study: A simple word processor. Dangerous stuff: Routines that return *. Array of strings: char * . Recurring case study: Part 4. Summary. 9. Structures. Syntax for structures. Arrays of structures. Pointers to structures. Case study: Indirect sorting. Generic functions. Incomplete struct declarations and information hiding. Arrays of structures with pointers to functions. Occasionally useful stuff. Recurring case study: Part 5. Summary. 10. Data Structures. Stacks. Queues. Hash tables. Case study: Single-source shortest paths. Linked lists. Summary. 11. Recursion. Rackground: Proofs by mathematical induction. Basic recursion. Numerical applications. Searching and sorting. Artificial intelligence. Summary. III. THE ENVIRONMENT: FILES, UNIX, AND C++. 12. I/O. printf. scanf. Extending terminal I/O to files. stdi
Computer Science
What problem does this paper attempt to address?