![[Book Cover]](../covergif/013362658X.gif)
|
Efficient C Programming: A Practical Approach, 1/e
Mark Allen Weiss, Florida International University
Published December, 1994 by Prentice Hall Engineering/Science/Mathematics
Copyright 1995, 529 pp.
Paper
ISBN 0-13-362658-X
$50.67
|
Sign up for future mailings on this subject.
See other books about:
C
|
This book teaches disciplined, readable, and efficient programming in the C programming language (as described in [ANSI 90]), with an emphasis on solving the types of problems that are widely encountered by programmers.
Follows three major themes: basic C, efficient C, and other C topics. Covers the general layout of a C program, control structures, functions, the C preprocessor, and the use of C to achieve efficient programs. Explores the I/O library, UNIX programming, and an introduction to C++.
(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.
stdin, stdout, and stderr. Binary files. remove and
rename. Command line arguments. Summary.
13. UNIX Systems Programming.
The UNIX file system. Processes. UNIX program development tools.
Summary.
14. Practical C++.
Syntactic sugar. Templated functions. Classes and the date ADT. A
more complex class: The String ADT. Templated classes. Inheritance
and dynamic binding. Summary.
Bibliography.
Appendix A. Technical Issues.
Appendix B. Grammar.
Appendix C. Minimums.
Appendix D. The Library.
Appendix E. ASCII Character Set.
Appendix F. MS-MOS C.
Appendix G. Selected Answers.
Index.
|