19 of 19 people found the following review helpful:
4.0 out of 5 stars
Good for the beginner to C programming, July 16, 2001
This book gives a fairly comprehensive overview of the most popular programming language ever employed. The C language still dominates the programming scene, even though at times it appears to be dying out. Compilers, embedded systems, scientific programming, and myriads of other applications use C extensively.
After a brief historical background and a discussion on how to compile programs in C, the author discusses the basic data types and character strings in C. The author emphasizes the lean nature of the C language, and gives an elementary discussion on debugging in C. A good discussion is given on integer and floating-point underflow and overflow and also the mechanics of argument passing via the stack.
The author then discusses the operators and control statements in C. He includes a discussion of Lvalues and Rvalues, and this is helpful since many books on C gloss over this. Good examples of the ability of C to do multiple assignment are given. Side effects, which are modifications of data objects, and sequence points, which are points in program execution at which side effects are evaluated before proceeding to the next step in the program, are briefly discussed. An understanding of side effects is crucial to programming effectively in C. Type conversion, forbidden in some other languages, can be done in C, and the author gives a fairly good discussion of type conversion and the cast operator. Nine examples are given that effectively illustrate the different uses of "for" loops. Unfortunately, the author includes a discussion of the "goto" statement, but does admonish against its use.
The author then moves into more about input and output and how to use buffered versus unbuffered input. Some of the discussion on how to create user interfaces is antiquated given the current state of graphical tools to do this.
C functions are defined and their use encouraged as building blocks. A program ideally should be written as a collection of function calls, and the author is sympathetic with this approach. The importance of function prototyping is discussed, along with a detailed discussion of recursion. The &operator is covered in the context of function calls the modify a value in the calling function without using a return value. This peculiarity of C is a sticking point to mathematicians when they attempt to program in C. The author explains fairly effectively the reasons for doing this in C, giving examples of what can happen when one adheres to a practice of never producing side effects in function calls.
The most difficult feature of C for newcomers is the existence of pointer variables. These are first discussed in the context of function calls and then in terms of the creation and initialization of arrays. Pointer arithmetic, an anathema to some programmers is given a fine treatment, along with how pointers are used to manipulate character strings and string functions.
The file communication capability of C is given a lengthy treatment in the book via standard I/O functions. The ability of C to support both global and local variables is discussed, with the important concepts of file, block, and function prototype given detailed treatment. The volatile, const, and restrict keywords are discussed also.
Data structures, the tour de force of C programming, is discussed in great detail by the author. He shows how to create nested structures, and most importantly how to define and use pointers to structures. This is one of the most powerful features of C, and is responsible for its continued use in performance-intensive applications.
Readers interested in the more "low-level" features of C will appreciate the discussion on bit fiddling. Indeed in embedded systems and cryptography an understanding of this is crucial for designing effective programs.
The important technique of conditional compilation, using the ifdef, else, endif, and ifndef directives are discussed with many helpful examples. Memory allocation, with malloc(), free(), and calloc() functions is given ample treatment. Anyone who has done any type of debugging of C applications will realize the importance of a complete understanding of this topic. Memory leaks and dangling pointers can cause great distress in applications written in C. The author should have spent more time here on dynamic memory allocation in C.
Some discussion is given on the more advanced data structures in C, such as linked lists, abstract data types, and binary trees.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
11 of 11 people found the following review helpful:
5.0 out of 5 stars
All-around best C refresher/ introduction., November 10, 2000
I have an eight year-old copy, and when getting back into C programming after a long layoff (don't ever take a promotion to project leader if you can't keep coding), I pulled this one off my shelf (skipping K&R's book, Herb Schildt's book, and three others in my library).
It got me right back into the mindset quickly (I started with the pointers chapter, where all the action is), and helped me get the rust knocked off quick. The examples are well-explained, small and easy to test, and the progression of the book is logical and sane. Buy it and you can wait a year before needing another book on C.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No