Buy used:
$45.13
FREE delivery November 27 - December 4
Or fastest delivery November 26 - December 2
Condition: Used: Good
Access codes and supplements are not guaranteed with used items.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Expert C Programming: Deep C Secrets First Edition

4.3 4.3 out of 5 stars 331 ratings

This book is for the knowledgeable C programmer, this is a second book that gives the C programmers advanced tips and tricks. This book will help the C programmer reach new heights as a professional. Organized to make it easy for the reader to scan to sections that are relevant to their immediate needs.


Amazon First Reads | Editors' picks at exclusive prices

Editorial Reviews

Amazon.com Review

Defying the stereotypical notion that technical books tend to be boring, Expert C Programming offers a lively and often humorous look at many aspects of C--from how memory is laid out to the details of pointers and arrays. The author reveals his points through invaluable anecdotes, such as stories of costly bugs, and through folklore, such as the contents of Donald Knuth's first publication. Each chapter ends with a section entitled "Some Light Relief," which discusses topics (topics that some may consider to be "recreational"), such as programming contests. A fabulous appendix on job interview questions finishes the book.

From the Back Cover

This is a very different book on the C language! In an easy, conversational style, Peter van der Linden, of Sun's compiler and OS kernel group, presents dozens of astonishing examples drawn from practical experience, including:

  • Software that blew up the space probe to Venus
  • The C bug that shut down the entire AT&T phone system
  • C programmer job interview secrets
  • Why programmers can't tell Halloween from Christmas day
  • The C code for a complete BASIC interpreter

Expert C Programming reveals the coding techniques used by the best C programmers. It relates C to other languages, and includes an introduction to C++ that can be understood by an programmer without weeks of mind-bending study. Covering both the IBM PC and UNIX systems, it is an entertaining and educational romp through C showing how experts really use it. Expert C Programming is a must read for anyone who wants to learn more about the implementation, practical use, and folklore of C.

"Not just clearly written, but fun to read. The tone and style of this text should make this a popular book with professional programmers. However, the tone of this book will make it very popular with undergraduates. Appendix A alone would make the purchase of this book a must. It's filled with great advice."

―Professor Jack Beidler, Chairman, Department of Computer Science, University of Scranton

"So that's why extern char *cp isn't the same as extern char cp. I knew that it didn't work despite their superficial equivalence, but I didn't know why. I also love the job interview test questions on C."

―David S. Platt, Rolling Thunder Computing

"In Expert C Programming, Peter van der Linden combines C language expertise and a subtle sense of humor to deliver a C programming book that stands out from the pack. In a genre too often known for windy, lifeless prose, van der Linden's crisp language, tongue-in-cheek attitude, and real-world examples engage and instruct."

―John Barry, author of Sunburst, Technobabble, and other books

Product details

  • Publisher ‏ : ‎ Pearson; First Edition (June 14, 1994)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 353 pages
  • ISBN-10 ‏ : ‎ 0131774298
  • ISBN-13 ‏ : ‎ 978-0131774292
  • Item Weight ‏ : ‎ 1.46 pounds
  • Dimensions ‏ : ‎ 7.55 x 1.2 x 9.1 inches
  • Customer Reviews:
    4.3 4.3 out of 5 stars 331 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Peter van der Linden
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Discover more of the author’s books, see similar authors, read book recommendations and more.

Customer reviews

4.3 out of 5 stars
331 global ratings

Customers say

Customers find the book captivating and informative. They appreciate the writing style, humor, and entertainment value. Readers also mention the text is illuminating. However, some customers feel the content is dated.

AI-generated from the text of customer reviews

26 customers mention "Readability"26 positive0 negative

Customers find the book great, captivating, and important. They also say it's light-hearted and hard not to enjoy.

"What an amazing book. Who better to write about the subtle nuances of C programming than a man that wrote a compiler?..." Read more

"“Expert C Programming: Deep Secrets” is a fun, light-hearted book with a look into some traps and subtleties of the C programming language...." Read more

"I have a copy on my nightstand full of annotations. This book is a joy to read. Plus, I learned something!..." Read more

"...The author's tone makes the subject an enjoyable read and at times even quite humorous which makes the pages turn quickly...." Read more

22 customers mention "Information quality"22 positive0 negative

Customers find the book very informative and captivating to read. They say it provides insight into the many quirks and gotchas of the C programming language. Readers also mention the book is clear and padded with interesting anecdotes. They appreciate the varied topics and clear introduction to basic concepts.

"...and how to program in it, and Peter gave a VERY nice, clear introduction to the basic concepts...." Read more

"...syntax: van der Linden has one chapter on this subject, providing a very useful algorithm (in two versions) that allows one to untangle virtually..." Read more

"...I actually liked the varied topics, this book wasn't meant to be a reference encyclopedia nor a indepth analysis of some specific topic...." Read more

"...It's amusingly written, and the historical anecdotes are very interesting...." Read more

12 customers mention "Writing style"12 positive0 negative

Customers find the writing style well-written, easy to read, and clear. They appreciate the informal voice of the author and the anecdotal tangents.

"...It was a very delightful text to read.This book is an absolute must have for anyone that programs in C (as a second book on the subject)...." Read more

"...: the middle chapters (on the runtime system and on memory) are very clear and interesting, but most of this material can already be found in any..." Read more

"...I like informal voice of the author, but the stories (clearly marked) rarely add any anything of value other than entertainment...." Read more

"The actual contents of the book and presentation are fairly good...." Read more

8 customers mention "Humor"8 positive0 negative

Customers find the book humorous and amusingly written. They also say the historical anecdotes are interesting.

"...I find most of the humor to be both comprehensible and more to the point, funny. It does take a slightly twisted way at looking at the world...." Read more

"...It's amusingly written, and the historical anecdotes are very interesting...." Read more

"...'s tone makes the subject an enjoyable read and at times even quite humorous which makes the pages turn quickly...." Read more

"...books.van der Linden covers the key aspects of C in a gentle, often funny, manner that makes this book read almost like you're having a friendly..." Read more

6 customers mention "Entertainment value"6 positive0 negative

Customers find the book entertaining and engaging.

"“Expert C Programming: Deep Secrets” is a fun, light-hearted book with a look into some traps and subtleties of the C programming language...." Read more

"...C training, and I was shocked to find that a lot of the book is dedicated to fun, interesting things about the C programming language whose..." Read more

"Very informative and entertaining (No small entertaining for a book about the murky corners of a programming language)...." Read more

"...The writing style is personable and consistently engaging, even through some of the more ethereal aspects of bit-flipping." Read more

3 customers mention "Illuminating text"3 positive0 negative

Customers find the text illuminating. They also appreciate the well-printed, coloured highlighting.

"...notably pointers vs. arrays and complicated declarations, are wonderfully illuminating...." Read more

"...The right hand pages are clean and look good. Makes it distracting to read, especially on the worst pages...." Read more

"...as classic by many, I was anticipating a well printed, coloured highlighting text. I was disappointed to see such a poor printing quality...." Read more

5 customers mention "Dated content"0 positive5 negative

Customers find the content outdated.

"...One crucial point is that the book is quite dated (before 1999 & C99), and this takes little of its value...." Read more

"...does suffer from a pro-Sun/anti-Microsoft bias and it does contain some outdated material...." Read more

"...At this point it's dated (no surprise), with discussions around the switch from K&R to ANSI style of declarations, and Sun specific information..." Read more

"...My only complaint is that it's a bit dated, having been written in 1994 it talks to the C90 standard...." Read more

3 customers mention "Time management"0 positive3 negative

Customers find the book not helpful, saying the code is screwed up and some of the examples are useless. They also mention it's a distinct waste of time.

"...(perfect binding style, not very perfect job)..." Read more

"...I recall it was a distinct waste of time. I'm no expert in C, so I needed tips...." Read more

"...the formatting for some of the code is screwed up making some of the examples useless." Read more

Very poor print quality
1 out of 5 stars
Very poor print quality
The inside looks as if this book was faxed to the print shop and the orange ink of the cover rubbed off on the two other books I ordered. It's not a comfortable read and after such a disappointment, I don't even care about the contents any more.
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

Reviewed in the United States on July 26, 2008
What an amazing book. Who better to write about the subtle nuances of C programming than a man that wrote a compiler? This book is not an introduction (if you couldn't tell by the name), nor is it a place for quick tips. The explanations are not long-winded, but they are complete. Peter hits on all the high points that are often not adequately explained in most books on C, that you really need to know to program correctly. After reading this book, I think the whole pointer/array thing is put to rest...at least for me. The job interview questions at the end were very helpful to me...I'm not going to take a job as a programmer any time soon, but they still tested my knowledge of the language and of programming in general. I gained a lot out of the last chapter, which is an intro to C++...I've been floundering trying to understand OOP and how to program in it, and Peter gave a VERY nice, clear introduction to the basic concepts.

I enjoyed Peter's humor (sometimes laugh out loud, which makes anyone raise their eyebrow when they see the book title) and writing style. It was a very delightful text to read.

This book is an absolute must have for anyone that programs in C (as a second book on the subject). It should be required reading for anyone that teaches a course on C programming.
8 people found this helpful
Report
Reviewed in the United States on September 11, 2021
“Expert C Programming: Deep Secrets” is a fun, light-hearted book with a look into some traps and subtleties of the C programming language.

It certainly doesn’t cover anything that isn’t known to most programmers who have worked with C., But it explains them in some detail and goes in-depth into some of them.

Unfortunately, it doesn’t cover as many topics as one would like, and this is to be expected of a book of this size and scope.

One crucial point is that the book is quite dated (before 1999 & C99), and this takes little of its value. This is due to the sad fact that many issues discussed still plague C programmers to this day. And many of the author’s predictions have already come to pass.

A book that may be suitable to readers of this book is “The Practice of Programming,” co-authored by the UNIX veteran Rob Pike.
3 people found this helpful
Report
Reviewed in the United States on November 21, 2011
Peter van der Linden's "Expert C Programming: Deep C Secrets", published in 1994, is already a classic. It explicitly assumes the reader knows how to program in C (according to the author, this "should be every programmer's second book on C"). In that sense, it is similar to Scott Meyers' "Effective C++" (originally published in 1991). Of course, C is a much smaller language than C++ but, even so, it does have some non-trivial aspects, which are precisely what van der Linden zeroes in on. Given the nature of this text, any review of its good and bad points needs to get down to the nitty-gritty.

The Good: Dennis Ritchie, in his essay on "The Development of the C language", wrote that "Two ideas are most characteristic of C among languages of its class: the relationship between arrays and pointers, and the way in which declaration syntax mimics expression syntax." In the book under review, van der Linden is at his finest when discussing precisely these two topics. Starting with arrays & pointers: the book includes 3 chapters on the subject, first tackling the classic "defined as array / external declaration as pointer" problem. Later, the author returns to the root of the confusion, namely that even though arrays and pointers are distinct entities in declarations/definitions, there is one major exception: a function can have an array parameter, but the argument will be converted to a pointer before the call (though this rule isn't recursive). As a result, even though arrays are not modifiable lvalues, you can use assignment inside a function since the argument will have been converted to a pointer. Leaving declarations behind us, the story gets more elaborate: i) when used in an expression an array name is converted to a pointer, and ii) a subscript is always equivalent to an offset from a pointer. Of course this is too straightforward, so the first point does not apply when the array "is the operand of the sizeof operator or the unary & operator, or is a string literal used to initialize an array" (6.3.2.1) -- C1X adds the _Alignof operator to this list. Moving on to Ritchie's second characteristic idea, the relationship between declaration syntax and expression syntax: van der Linden has one chapter on this subject, providing a very useful algorithm (in two versions) that allows one to untangle virtually any possible declaration (though it would have been nice if he had also mentioned "go right when you can, go left when you must"). He then applies this algorithm to the signal library function (sigaction's prototype was presumably too simple). In this connection, the author makes the interesting observation that the addition of const and volatile to ANSI C led to a reduction of the number of cases in which the use of a variable mimics its declaration. In a later chapter he makes a similar point regarding calls to a function and calls to a function through a pointer (or any level of pointer indirection). These are only two examples of van der Linden's non-hagiographic attitude: he devotes an entire chapter to the aspects of C he doesn't like (C's "sins of commission, sins of omission, and sins of mission" as he calls them), bringing to mind Matthew Wilson's later volume "Imperfect C++". The author's choice of words in this case ("sins of mission") reflects his wider approach to writing: his style is relaxed and often funny (more so in the early chapters). For example, he quotes Peter Weinberger (of awk fame) as saying: "All C programs do the same thing: look at a character and do nothing with it". Finally, the book does contain a number of other insights/techniques from various aspects of C programming, some important and relatively obvious (e.g. to implement a finite-state machine in C you probably need an array of pointers to functions), others considerably less so (e.g. the typedef keyword doesn't have to appear at the start of a declaration!).

The Bad: starting with big-picture issues, it's worth pointing out that the title is somewhat misleading. The book under review is better described by its subtitle "Deep C Secrets" (pun notwithstanding), as what it mainly covers are C's dark corners. Still on the theme of what a book with this title should or shouldn't include: the middle chapters (on the runtime system and on memory) are very clear and interesting, but most of this material can already be found in any undergrad Operating Systems textbook (minus the SunOS bent). While it is true that a skilled C programmer should know this stuff, these chapters are nowhere near expert-level. On a different note, the book is showing its age. Its datedness has secondary consequences (e.g. repeated references to MS-DOS and one mention of "machines on the Internet network") but also substantive repercussions. As this book came out in 1994, it doesn't contain anything on C99, therefore no bool, inline, restrict, static and type qualifiers in parameter array declarators, or any of the other features. Interestingly, van der Linden does mention that at the time people were talking about adding a complex number type to C: this was added in C99, but it looks like it's going to become optional in C1X. Similarly, he laments the fact that gets was included in C89: it was deprecated in C99 and will be removed in C1X. As could be expected, the C++ chapter is even more temporally bound. The text also suffers from a few minor issues which ordinarily wouldn't be worth noting, but seem out of place in a detail-oriented book whose author and publisher have had 17 years to fix up lesser faults. For example, terms like "data segment" and "text segment" are thrown around in the first half of the book but are only introduced in chapter 6 (of 11). At an even more fine-grained level, the order of expression evaluation is said to be unspecified on p. 48 though it was undefined only a page earlier. Another category of minor problems has to do with issues that were mangled in later reprints despite the errata list. First, on p. 80 the early part of the section title on "typedef x int[10] and #define x int[10]" was silently changed between printings (i.e. without an entry on the errata page) to "typedef int x[10]". This raises new issues which are also not discussed in the main text: the macro expansion leads to an invalid declaration, but now the typedef is legal. Second, p. 205 used to say "the automatic promotion of a character literal causes it to become an int", but in a later printing this was changed to "character literals have type int and they get there by following the rules for promotion from type char" which is obfuscatory at best. In reality, character literals (officially called "character constants") have type int because the standard says so: "An integer character constant has type int" (6.4.4.4). [As an aside, this is one of the incompatibilities between C and C++ mentioned by van der Linden on p. 326.]. Finally, the book's index is hopeless: e.g. there's an entry on Fortran and a separate one on Fortran 90, but no entries on functions or structs.

Readers who are searching for a "second book on C" with lots of insights on design should probably look at David Hanson's "C Interfaces and Implementations", as "Expert C Programming" doesn't really discuss large-scale software construction. Also, this book does suffer from a pro-Sun/anti-Microsoft bias and it does contain some outdated material. However, a finite fraction of the C community still uses C89/C90 exclusively, so for readers who want to study not-so-often examined aspects of C this text is irreplaceable (despite minor problems here and there). All in all, 4 stars.

Alex Gezerlis
77 people found this helpful
Report
Reviewed in the United States on March 27, 2003
Ok, this is in answer to another review. First, I don't think this book was meant for the 20 yr pro. I know the title implies that but honestly I think it was meant for the beginner/slightly experienced programer. Anybody who has read K&R thru and thru should probably skip this book if your looking for more ways to improve your coding practices. Honestly I don't think you would gain that much from it. I would though suggest reading it for the humor.
=)
And here is where I part with that reviewer. I find most of the humor to be both comprehensible and more to the point, funny. It does take a slightly twisted way at looking at the world. Most of the "wasted" paragraphs etc. are not actually wasted, if you're a mid lvl or beginner programer. Even some with experience can get some use out of this book. I do agree that this is probably a 3rd or 4th book for coders. As to the char** not being the same as const char**, just read it VERY carefully, after a bit you will understand. Though I do agree that the author could have been a bit clearer on that an a few other explanations.
I actually liked the varied topics, this book wasn't meant to be a reference encyclopedia nor a indepth analysis of some specific topic. AND personally I am tired of dry books. Which btw, this particular author has been just as guilty as most other computer book authors. Try his Java book and you will see what I mean.
10 people found this helpful
Report

Top reviews from other countries

Translate all reviews to English
JI
5.0 out of 5 stars A classic read right up there with K&R
Reviewed in Canada on January 22, 2024
This is such a classic. Funny and insightful with lots of obscure UNIX and C history sprinkled throughout. It's very old but mostly evergreen content. Would love to see it back in print.
Marcelo Rezende Módolo
4.0 out of 5 stars Very practical and straightforward
Reviewed in Brazil on August 6, 2021
I learned a lot! Details about the language and standards that I was not aware of!
Subrat Prasad
5.0 out of 5 stars Nice Book for learning C.
Reviewed in India on June 28, 2020
If the reader has some prior experience in C, then it will clear up many concepts. For new readers, practice is required to understand fully.
Andrea S.
5.0 out of 5 stars La sfida a chi crede di conoscere il C
Reviewed in Italy on July 22, 2018
Per me IL vero libro del C è questo. Conobbi questo testo anni fa durante gli studi universitari per fare un esame importante e riconobbi subito lo spessore dell'opera.

Il libro non insegna la sintassi del linguaggio o gli aspetti in comune con altri linguaggi, cose che si possono anche imparare facilmente in autonomia, ma piuttosto entra nel dettaglio dei vari aspetti dello standard, specificando cosa è standardizzato e cosa invece può dipendere dal compilatore, cosa accade in situazioni impreviste quando tutto sembra corretto e invece non va, errori comuni, cosa succede usando con leggerezza alcuni aspetti del linguaggio, le differenze tra espressioni che a prima vista sembrano equivalenti, propone domande che a confronto Marzullo sembra un dilettante, ecc ecc... tutto andando a cercare il pelo nell'uovo.

Credetemi sulla parola, la stragrande maggioranza di coloro che credono di conoscere già il C rimarranno a bocca aperta leggendo questo testo. E' un'opera incredibile che raccoglie e racchiude l'esperienza e la competenza dell'autore e che obbligherei ogni studente universitario di informatica a studiare.

Se state guardando questa pagina, con ogni probabilità avete già abbastanza motivi per comprare questo libro, quindi compratelo e basta.
James
4.0 out of 5 stars Good book but amazon sent me an old one.
Reviewed in Japan on March 17, 2023
I only have a pdf version of this book, so I want a paper one. Unfortunately, amazon sent me an old book(folded in several pages, the cover was also very dirty) which I have to return it. But overall, this book is terrific. 5 stars for the book, 1 star for amazon.