Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
News Books Media Book Reviews

Advanced C Programming by Example 47

LizardKing has sent us a review of John Perry's Advanced C Programming by Example. Covering topics such as pointer trickery, string manipulation and dynamic data structures, this book is designed for those of you who are looking to fine-tune your C skills. Click below for more information.
Advanced C Programming by Example
author John W. Perry
pages
publisher PWS
rating 9/10
reviewer LizardKing
ISBN
summary An unusualy well written C textbook, that picks up where most other programming guides finish off.

The Scenario

Having been given a book voucher for Christmas, I duly trotted off to Blackwell's bookshop in Oxford to see what I could spend it on. I did the obligatory check for new O'Reilly titles, before turning to the C books. A hardback copy of Kamp II to replace my dog-eared paperback would've been nice, but first I decided to flick through Advanced C Programming by Example. The contents page promised examples of pointer trickery, string manipulation and dynamic data structures. I consequently bought it.

What's Bad?

There is very little to fault this book on. It is written in a clear and enjoyable manner, which is about the best you can hope for from a programming guide. My only real criticism is the lack of a bibliography. For instance, cryptography is mentioned in the chapter on bit manipulation, but no references to further reading are given.

What's Good?

The introduction explains the rationale behind producing another C book by pointing to the dearth of intermediate level texts. The author also criticises the current emphasis on OO languages with their larger vocabulary and more abstract concepts.

The first chapter highlights the importance of coding style to aid maintainability, and the valid use of features like the ternary and comma operators. This is followed by an excellent review of pointer theory. I always judge a C book by how clearly it describes the purpose of pointers - and this one does it superbly.

Subsequent chapters contain in depth analysis of key data structures like singly and doubly linked lists, binary trees, etc. While most C books include examples of these, they are particularily well described and illustrated. Other important techniques like hashing (both to memory and disk) are introduced, with common pitfalls highlighted.

The bit manipulation chapter is comparable with those in other C texts, but is unusually clear and consistent. The same can be said of the advanced I/O chapter.

The chapter on string manipulation uses dynamic memory allocation, arrays of pointers and the more obscure ANSI C string functions for 'real world' examples. This is another area where many C books fall down, ignoring the fact that the strings many programmers deal with cannot be expected to fit into fixed length arrays.

The final "Pot-Pourri" chapters include a discussion of complex function declarations that both expect and return function pointers. A number of other rarely described but expressive features are also covered.

So What's In It For Me?

If you consider yourself a C expert, then this book may be superfluous, as it covers ideas and principles you should know intimately. But if like me you're spending more time with scripting languages like Perl, you may need a handy reference for those forays back into C.

Buy this book here.

Table of Contents

  1. Optimal C Coding Style
  2. Review of Standard Pointer and Array Operations
  3. The Linear Dynamic Data Structures: Stacks, Queues and Linked Lists
  4. Advanced String Handling
  5. Advanced Input and Output
  6. Bit Manipulation
  7. Recursion and Binary Trees
  8. Multidimensional Arrays and Arrays of (Non-Char) Pointers
  9. Potpourri: Part One
  10. Potpourri: Part Two
  11. Answers to Selected Exercises
This discussion has been archived. No new comments can be posted.

Advanced C Programming by Example

Comments Filter:

THEGODDESSOFTHENETHASTWISTINGFINGERSANDHERVOICEISLIKEAJAVELININTHENIGHTDUDE

Working...