2012 Puddly Awards
 
 
Follow us on TwitterFollow us on FacebookFollow us on TumblrSubscribe to RSS


Recently Viewed clear list


Interviews | January 24, 2012

Jill Owens: IMG Ben Marcus: The Powells.com Interview



Ben MarcusBen Marcus's books The Age of Wire and String and Notable American Women were considered "experimental" fiction because of his unconventional use of... Continue »
  1. $18.17 Sale Hardcover add to wish list

    The Flame Alphabet

    Ben Marcus 9780307379375

spacer
Free Shipping!

Ships free on qualified orders.
$19.50
Used Trade Paper
Ships in 1 to 3 days
Add to Wishlist
Qty Store Section
1 Local Warehouse Computer Languages- C

C Traps and Pitfalls

by Andrew Koenig

C Traps and Pitfalls Cover

 

Synopses & Reviews

Publisher Comments:

Even C experts come across problems that require days ofdebugging to fix. This book helps to prevent such problems byshowing how C programmers get themselves into trouble. Each ofthe book's many examples has trapped a professional programmer.

In addition to its examples, C Traps and Pitfalls offers adviceon:

  • avoiding off-by-one errors
  • understanding and constructing function declarations
  • understanding the subtle relationship between pointers andarrays

Distilled from the author's experience over a decade ofprogramming in C, this book is an ideal resource for anyone,novice or expert, who has ever written a C program.

0201179288B04062001

Book News Annotation:

Even C experts encounter problems that require days of debugging. This book shows how to prevent such problems. Also includes advice for mastering often-misunderstood parts of C.
Annotation c. Book News, Inc., Portland, OR (booknews.com)

Synopsis:

Even C experts come across problems that require days of debugging to fix. This book helps to prevent such problems. C Traps and Pitfalls offers advice on: avoiding off-by-one errors, understanding and constructing function declarations, understanding the subtle relationship between pointers and arrays.

About the Author

Andrew Koenig is a member of the Large-Scale Programming Research Department at AT&T's Shannon Laboratory, and the Project Editor of the C++ standards committee. A programmer for more than 30 years, 15 of them in C++, he has published more than 150 articles about C++, and speaks on the topic worldwide.

0201179288AB04062001

Table of Contents

Introduction.

1. Lexical Pitfalls.

= is not ==

& and are not && or

Greedy lexical analysis.

Integer constants.

Strings and characters.

2. Syntactic pitfalls.

Understanding function declarations.

Operators don't always have the precedence you want.

Watch those semicolons!

The switch statement.

Calling functions.

The dangling else problem.

3. Semantic pitfalls.

Pointers and arrays.

Pointers are not arrays.

Array declarations as parameters.

Eschew synecdoche.

Null pointers are not null strings.

Counting and asymmetric bounds.

Order of evaluation.

The &&, , and ! operators.

Integer overflow.

Returning a value from main.

4. Linkage.

What is a linker?

Declarations vs. definitions.

Name conflicts and the static modifier.

Arguments, parameters, and return values.

Checking external types.

Header files.

5. Library functions.

Getchar returns an integer.

Updating a sequential file.

Buffered output and memory allocation.

Using errno for error detection.

The signal function.

6. The preprocessor.

Spaces matter in macro definitions.

Macros are not functions.

Macros are not statements.

Macros are not type definitions.

7. Portability pitfalls.

Coping with change.

What's in a name?

How big is an integer?

Are characters signed or unsigned?

Shift operators.

Memory location zero.

How does division truncate?

How big is a random number?

Case conversion.

Free first, then reallocate?

An example of portability problems.

8. Advice and answers.

Advice.

Answers.

Appendix: printf, varargs, and stdarg.

The printf family.

Simple format types.

Modifiers.

Flags.

Variable field width and precision.

Neologisms.

Anachronisms.

Variable argument lists with varargs.h.

Implementing varargs.h.

stdarg.h: the ANSI varargs.h. 0201179288T04062001

Product Details

ISBN:
9780201179286
Author:
Koenig, Andrew
Publisher:
Addison-Wesley Professional
Location:
Reading, Mass. :
Subject:
Programming Languages - C
Subject:
Programming Languages - General
Subject:
C (computer program language)
Subject:
Technology
Subject:
Computers and computer technology
Subject:
Programming (electronic computers)
Subject:
Language, literature and biography
Subject:
C
Subject:
Computer Languages-C++
Copyright:
Edition Description:
Trade paper
Series Volume:
1233
Publication Date:
January 1989
Binding:
TRADE PAPER
Grade Level:
Professional and scholarly
Language:
English
Illustrations:
Yes
Pages:
160
Dimensions:
9.19x6.24x.38 in. .50 lbs.

Other books you might like

  1. $27.50 Used Trade Paper add to wish list

    Expert C Programming

    Pete Van Der Linden 9780131774292
  2. $65.50 New Trade Paper add to wish list

    A Book on C

    Al Kelley 9780201183993
  3. $84.67 New Trade Paper add to wish list

    The Standard C Library

    P. J. Plauger 9780131315099
  4. $13.95 Used Trade Paper add to wish list
  5. $47.00 Used Trade Paper add to wish list
  6. $25.00 Used Trade Paper add to wish list

    Sed & Awk 2ND Edition

    Dale Dougherty 9781565922259

Related Aisles

C Traps and Pitfalls Used Trade Paper
0 stars - 0 reviews
$19.50 In Stock
Product details 160 pages Addison-Wesley Professional - English 9780201179286 Reviews:
"Synopsis" by , Even C experts come across problems that require days of debugging to fix. This book helps to prevent such problems. C Traps and Pitfalls offers advice on: avoiding off-by-one errors, understanding and constructing function declarations, understanding the subtle relationship between pointers and arrays.
spacer
spacer
  • back to top
Follow us on...


Powell's City of Books is an independent bookstore in Portland, Oregon, that fills a whole city block with more than a million new, used, and out of print books. Shop those shelves — plus literally millions more books, DVDs, and eBooks — here at Powells.com.