The C Puzzle Book

Puzzles for the C Programming Language

Alan R. Feuer

Publisher: Prentice Hall, 1982, 173 pages

ISBN: 0-13-109926-4

Keywords: Programming

Last modified: March 20, 2022, 10:44 p.m.

The process of learning C may be modeled by three steps:

  1. understand the language syntax;
  2. know what meaning the translator will ascribe to properly formed constructions;
  3. develop a programming style fitting for the language.

The puzzles in this book are designed to help the reader through step two. They will challenge the reader's mastery of the basic rules of C and lead the reader into seldom-reached corners, beyond reasoable limits, and past a few open pits. In short, they provide the reader with insight into C that is usually only gained through considerable experience.

The C Puzzle Book is a workbook intended to be used with a C language textbook. The book is divided into sections, each containing C programs that explore a particular aspect of C. Accompanying detailed descriptions of how the programs work are tips and caveats for writing successful C programs.

  • Puzzles
    • Operators
      1. Basic Arithmetic Operators
      2. Assignment Operators
      3. Logic and Increment Operators
      4. Bitwise Operators
      5. Relational and Conditional Operators
      6. Operator Precedence and Avaluation
    • Basic Types
      1. Character, String, and Integer Types
      2. Integer and Floating Point Casts
      3. More Casts
    • Include Files
    • Control Flow
      1. if Statement
      2. while and for Statements
      3. Statement Nesting
      4. switch, break, and continue Statements
    • Programming Style
      1. Choose the Right Condition
      2. Choose the Right Construct
    • Storage Classes
      1. Blocks
      2. Functions
      3. More Functions
      4. Files
    • Pointers and Arrays
      1. Simple Pointer and Array
      2. Array of Pointers
      3. Multidimensional Arrays
      4. Pointer Stew
    • Structures
      1. Simple Structure, Nested Structure
      2. Array of Structures
      3. Array of Pointers to Structures
    • Preprocessor
      1. The Preprocessor Doesn't Know C
      2. Caution Pays
  • Solutions
    • Operators
    • Basic Types
    • Control Flow
    • Programming Style
    • Storage Classes
    • Pointers and Arrays
    • Structures
    • Preprocessor
  • Appendices
    1. Precedence Table
    2. Operator Summary Table
    3. ASCII Table
    4. Type Hierarchy Chart

Reviews

The C Puzzle Book

Reviewed by Roland Buresund

Very Good ******** (8 out of 10)

Last modified: May 21, 2007, 3:25 a.m.

Excellent book to steal examples for if you are developing courses in C (like I did). A classical book that has stood the test of time.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required