• Twitter
  • FaceBook

Security Forums

Log in

FAQ | Search | Usergroups | Profile | Register | RSS | Posting Guidelines | Recent Posts

Book Review - A Book On C, Fourth Edition

Users browsing this topic:0 Security Fans, 0 Stealth Security Fans
Registered Security Fans: None
Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> News // Columns // Articles

View previous topic :: View next topic  
Author Message
Trusted SF Member
Trusted SF Member

Joined: 26 Aug 2003
Posts: 31
Location: Warwickshire, England, UK


PostPosted: Sun Oct 23, 2005 1:15 pm    Post subject: Book Review - A Book On C, Fourth Edition Reply with quote

A Book On C: Programming In C, Fourth Edition

Author: Al Kelley, Ira Pohl
Publisher: Addison-Wesley
Date Published: 1998
Book Specifications: Softcover, 726 pages
Category: Programming Languages / C
Publisher's Suggested User Level: N/A
Reviewer's Suggested User Level: Beginning Programmers
Suggested Publisher Price: $49.99 US / $77.99 CDN
ISBN: 0-201-18399-4
Amazon.com: http://www.amazon.com/exec/obidos/ASIN/0201183994
Amazon.co.uk: http://www.amazon.co.uk/exec/obidos/ASIN/0201183994

From back cover:
Now in its fourth edition, A Book On C retains the features that have made it a proven best-selling tutorial and reference on the ANSI C programming language. This edition builds on the many existing strengths of the text to improve, update and extend the coverage of C, and now includes information on transitioning to Java and C++ from C.

Beginners and professional programmers alike will benefit from the numerous examples and extensive exercises developed to guide readers through each concept. Step-by-step dissections of program code illuminate the correct usage and syntax of C language constructs and reveal the underlying logic of their application. The clarity of exposition and format of the book make it an excellent reference on all aspects of C.

I used to wonder how there could be so many bad programmers in the world. After reading this book, I now know. Initially, I thought the book was a reasonable discussion of C. Not the best I've read, but even so, reasonable. When I hit the later chapters, I began to realise that this is one of those books where the authors clearly had too large a scope. Too much was packed into a single book, and, as a result, the reader is left confused (at best) or overwhelmed.

Some aspects of this book work well, and I believe it is possible to learn C from this book, provided you take the advice with a pinch of salt, and do not put too much effort into reading the later chapters.

Chapter Synopsis & Review Comments
The book opens with a poor joke; a chapter zero, since counting in C begins with zero. This chapter introduces C and the ANSI C standard. It also talks of C++ and Java, two topics which, in my opinion, should not feature in a book on C programming.

Chapter 1 looks at an overall picture of C, though seasoned programmers will be disappointed that the perennial "Hello World" program has been replaced with a program printing another text string. In this chapter, incomplete versions of the printf and scanf format string tables are presented. Although these are provided in full later, it would be beneficial to provide the entirety of the information at the beginning, such that the programmer can consider the many format strings as he or she works through the remainder of the book.

Chapter 2 provides a very rigorous description of the language syntax and grammar. Whilst this is useful to language theorists, a more practical, less formal approach would serve the beginner (or newcomer to C) somewhat better.

Chapter 3 discusses the fundamental data types, conversions and casting. There is little to fault with the presentation of content in this chapter, but equally nothing stands out as being exceptionally good.

In chapter 4, flow control statements are introduced. Logical operators, relational operators and equality are discussed, before moving on to the if, while, for and switch statements.

Chapter 5 discusses functions. In the discussion of prototypes, confusion is added by bringing up C++ function prototypes, which are completely irrelevant to a discussion of C functions in a book about C programming. Scope rules are discussed in this chapter, and there is a look at creating large programs by combining many functions from many files.

Arrays, pointers and strings are the topics of chapter 6. Most C books split this discussion such that arrays and pointers are presented together, and then strings are dealt with later, in a chapter of their own, or along with the Input/Output functions. In this book, chapter 6 is too large.

Chapter 7 presents an entire section of the book dedicated to bitwise operators and enumeration types. These are usually covered along with the other operators, and often near the beginning of the book in the data types section.

Chapter 8 introduces the preprocessor. This discussion is important for a C book, since it is possible to achieve many useful effects through the preprocessor, including inclusion guards - preventing a header being included more than once - and conditional compilation, to isolate platform-specific code from ANSI C code.

In chapter 9, structures and unions are presented. Given the structure of this book, merging chapter 7 into chapter 9 would perhaps make sense.

Chapter 10 moves into the discussion of data structures. Whilst these are important programming concepts, books dealing solely with algorithms and data structures exist, and provide a far more accurate and usable description than can be achieved in a single chapter in a more generic book.

Input/Output is the topic of chapter 11. I feel this chapter should have been much earlier in the book, but there is little to fault with the I/O section of this chapter. The chapter does, however, go wildly off topic with discussions of generic software development. Again, this is useful for a developer to know, but there are specific books which provide a far more comprehensive treatment of these topics than the authors provide here.

Chapter 12 is the one I found least relevant. In a book on C, it should be standard C which is discussed, perhaps with minor forays into the operating specific variations. Chapter 12 discusses UNIX system calls in detail, and does not provide any discussion of conditional compilation guards to prevent UNIX specific code being compiled on Windows systems, for instance. This chapter goes off on a tangent to standard C, and I feel it should not have been included at all.

In chapters 13 and 14, C++ and Java are introduced. Whilst it is reasonable to give an overview of other languages, perhaps this should have been as a single appendix, showing some alternative languages and their similarities (and differences) to C. Instead, the C++ and Java chapters have become an integral part of this book. Neither language can be taught entirely in a single chapter of a C book, and both chapters are outdated and refer to C++ and Java as "improved C". C++ and Java operate with entirely different programming methodologies, and there is no concept of them being generically "better" or "worse" than C; they are simply different, even if they were derived, originally, from C.

The book ends with 5 appendices. Appendix A details the standard C library, explaining the functions provided by each standard header. Appendix B discusses language syntax in detail, while appendix C compares ANSI C to traditional C. Appendix D provides an ASCII character code table, and appendix E gives an operator precedence and associativity table; something which most books include along with their initial discussion on operators - although placing one at the end does serve as a useful reference.

This book is badly organised, out of date, and too wildly generic in scope. It does, however, have a good core. I believe that it is possible to carefully pick out sections of this book from which it is possible to learn C, although anyone reading from cover to cover would likely end up somewhat confused, especially if they have not programmed before.

From reading this book, the impression is that the authors do not usually program in C, but have written a book on C simply to provide a springboard into languages such as C++ and Java. Whether this was the intention is unknown, but this is certainly the impression given.

The one redeeming feature of this book is the end of chapter exercises, of which there are many. In most cases, these are well thought out exercises, which challenge the reader to put to use their newly gained knowledge of C.

Due to the outdated nature of some of the discussion, the technical inaccuracies in places, and the scope being far too wide for a book specific to C, I cannot rate this higher than a 5.

This book receives an honoured SFDC rating of 5/10

Keywords: C, programming, C++, Java, UNIX, system, I/O, input, output, printf, scanf, ANSI

This review is copyright 2005 by the author, Andrew J. Bennieston, and Security-Forums Dot Com, and may not be reproduced in any form in any media without the express permission of the author, or Security-Forums Dot Com.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   

Post new topic   Reply to topic   Printer-friendly version    Networking/Security Forums Index -> News // Columns // Articles All times are GMT + 2 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Community Area

Log in | Register