Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Introductory C (2nd ed.)
Petersen R., Academic Press Prof., Inc., San Diego, CA, 1996. Type: Book (9780125521420)
Date Reviewed: Dec 1 1997

This complete C primer also includes an introduction to C++. The material is centered on the idea that, in C and C++, pointers are used in a variety of ways with every feature of the language. Therefore, “the primary aim of this text is to provide working models of how pointers are used in C as well as an introduction to their use in C++.”

The text is arranged in five sections. The first section (nine chapters) covers the fundamentals of C, such as basic data types, statements, functions, structures, scope rules, and program organization. Pointers are introduced in chapter 5 and, from then on, are discussed in connection with each newly introduced feature of the language. The second section (five chapters) is devoted to arrays and their pointer operations, including arrays of characters, of structures, of arrays, and of pointers. Arrays are handled in a separate section because the author views them as an exception in C data structures: they are not data objects and they are completely managed by pointers.

The third section describes data structures and file management. The chapter on data structures introduces linked lists, binary search trees, and recursive processing of these structures. The next three chapters are devoted to file management, and discuss text files, record files, and the stream I/O file interface. File management techniques involving information hiding and encapsulation, and file indexing based on b-trees, are also discussed.

The fourth section introduces C++ in three chapters; it covers classes and objects, dynamic objects, friend functions, operator overloading, inheritance, and virtual functions. The fifth section covers additional C topics in greater detail, including the preprocessor, bitwise operations, the make utility, formatted I/O, and type conversions.

The last section contains appendices on the ASCII code, the standard C library, and particularities of the Kernigan and Ritchie version of C. Every chapter in the first four sections ends with a chapter summary and proposed exercises.

The book is well organized and presents a complete and thorough introduction to the C language. The main aim of the book--explaining how pointers are used and managed in C--is achieved, and the text should reduce the confusion of C beginners on this subject. Petersen uses a procedural approach to C programming, favoring clarity over programming tricks that tend to create obscure programs. The example programs are short but relevant and clearly demonstrate the concepts under discussion. Slightly larger programs integrate each new feature. The book focuses on ANSI standard C and includes a disk with source code for the example programs and solutions to the exercises.

The three chapters devoted to C++ start from the idea that is easier to learn C++ by building on an understanding of C. The main features of C++ are presented, and the examples are C++ versions of programs developed earlier in the text for C, highlighting the similarities and differences between C and C++.

The book is a good C primer and introduction to C++ for people familiar with concepts such as variables, statements, subprograms, and data types. It may be difficult for those who have no previous programming experience, although most of the basic programming concepts are explained sooner or later. Many of these concepts are used in the text, some in comparison with how they are implemented in other languages, and only explained later. The focus on C language features leads the author to disregard the accurate definition of some general concepts, such as data types, data structures, and recursion. The definition “a data type specifies a way to interpret a sequence of binary bits” might be easy to understand, but it is not entirely accurate. On the other hand, object-oriented concepts are introduced well in the C++ section.

The figures included in the text help clarify many programming issues and give intuitive models that correlate with the representations in memory of variables, arrays, and pointers. The index is adequate, but an index of tables (in most cases, tables summarize essential elements of a chapter) and an index of programs would have been helpful.

The book may be used both in undergraduate programming language courses and by those wishing to learn or to improve their knowledge of C and to get a quick introduction to C++.

Reviewer:  A. Florea Review #: CR120837 (9712-0962)
Bookmark and Share
 
C (D.3.2 ... )
 
 
C++ (D.3.2 ... )
 
 
Data Types And Structures (D.3.3 ... )
 
 
Dynamic Storage Management (D.3.3 ... )
 
 
Procedures, Functions, And Subroutines (D.3.3 ... )
 
 
Studies Of Program Constructs (F.3.3 )
 
Would you recommend this review?
yes
no
Other reviews under "C": Date
C (2nd ed.)
Schildt H., Osborne/McGraw-Hill, Berkeley, CA, 1990. Type: Book (9780078815386)
Jan 1 1992
C: a software engineering approach
Darnell P., Margolis P., Springer-Verlag New York, Inc., New York, NY, 1991. Type: Book (9780387973890)
Dec 1 1991
C for programmers
Ammeraal L., John Wiley & Sons, Inc., New York, NY, 1991. Type: Book (9780471928515)
Dec 1 1991
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy