Product Details
C Pocket Reference

C Pocket Reference
By Peter Prinz, Ulla Kirch-Prinz

List Price: £7.50
Price: £4.27 & eligible for FREE Super Saver Delivery. Details

Availability: Usually dispatched within 24 hours
Dispatched from and sold by Amazon.co.uk

40 new or used available from £2.36

Average customer review:

Product Description

C is one of the oldest programming languages and still one of the most widely used. Whether you're an experienced C programmer or you're new to the language, you know how frustrating it can be to hunt through hundreds of pages in your reference books to find that bit of information on a certain function, type or other syntax element. Or even worse, you may not have your books with you. Your answer is the C Pocket Reference. Concise and easy to use, this handy pocket guide to C is a must-have quick reference for any C programmer. It's the only C reference that fits in your pocket and is an excellent companion to O'Reilly's other C books. It can be used as an introduction for beginners and a quick reference for advanced programmers, the C Pocket Reference consists of two parts: a compact description of the C language and a thematically structured reference to the standard library. The representation of the language is based on the ANSI standard and includes extensions introduced in 1999. An index is included to help you quickly find information the information you need. The book covers the following: C language fundamentals; data types; expressions and operators; C statements; declarations; functions; preprocessor directives; and the standard library.


Product Details

  • Amazon Sales Rank: #71179 in Books
  • Published on: 2002-11-20
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 144 pages

Editorial Reviews

From the Publisher
Ideal as an introduction for beginners and a quick reference for advanced programmers, the C Pocket Reference consists of two parts: a compact description of the C language and a thematically structured reference to the standard library. The representation of the language is based on the ANSI standard and includes extensions introduced in 1999. An index is included to help you quickly find information the information you need.

About the Author
Peter Prinz specializes in developing software and in teaching Assembler, C/C++/C#, Java, Windows (MFC), and UNIX system programming. As the chief developer and cofounder of an IT company, Peter has gained extensive experience in software development for computer telephony. As a seminar leader and key course developer at a professional consulting and training company he has taught courses to thousands of software developers. Peter is the co-author with his wife Ulla of several other books on software development in C/C++. More recent projects include "A Complete Guide to Programming in C++" (Jones & Bartlett Publishers, 2002). Peter currently resides in Munich, Germany, with Ulla and their two children: Vivi and Jeany. He may be contacted by email at prinz_peter@t-online.de

Excerpted from C Pocket Reference by Peter Prinz, Ulla Kirch-Prinz. Copyright © 2002. Reprinted by permission. All rights reserved.
Statements

A statement specifies an action to be performed, such as an arithmetic operation or a function call.Many statements serve to control the flow of a program by defining loops and branches. Statements are processed one after another in sequence,except where such control statements result in jumps.

Every statement that is not a block is terminated by a semicolon.

Block and Expression Statements
A block, also called a compound statement, groups a number of statements together into one statement. A block can also contain declarations.

The syntax for a block is:
{[list of declarations ][list of statements ]}

Here is an example of a block:
{int i =0;/*Declarations */
static long a;
extern long max;
++a;/*Statements */
if(a >=max)
{...}/*A nested block */
...
}

The declarations in a block normally precede the statements. However, ANSI C99 permits free placement of declarations. New blocks can occur anywhere within a function block. Usually a block is formed wherever the syntax calls for a statement, but the program requires several statements. This is the case, for example, when more than one statement is to be repeated in a loop.

An expression statement is an expression followed by a semi-colon.The syntax is:
[expression ] ;;

Here is an example of an expression statement:
y =x;//Assignment

The expression — an assignment or function call, for example —is evaluated for its side effects. The type and value of the expression are discarded.

A statement consisting only of a semicolon is called an empty statement, and does not peform any operation. For example:
for (i =0;str [i ] !!='\0';++i )
;//Empty statement

Jumps
The following statements can be used to control the program flow:
•Selection statements:if ...else or switch
•Loops:while ,do ...while or for
•Unconditional jumps:goto ,continue ,break or return

if ... else
The if statement creates a conditional jump .

Syntax: if (expression )statement1 [else statement2 ]
The expression must have a scalar type.First,the if statement’s, controlling expression is evaluated.If the result is not equal to 0 — in other words, if the expression yields "true "—then statement1 is executed. Otherwise,if else is present, statement2 is executed.

Example:
if (x >y)max =x;//Assign the greater of x and y to
else max =y;//the variable max.

The use of else is optional. If the value of the controlling expression is 0, or "false", and else is omitted,then the program execution continues with the next statement.

If several if statements are nested, then an else clause always belongs to the last if (in the given block nesting level) that does not yet have an else clause. An else can be assigned to a different if by creating explicit blocks.


Customer Reviews

Complete, well-written and up-to-date5
This reference is remarkably complete, well-written and useful. It is probably not for the absolute beginner, but indispensable for those wanting a terse description of the C language and a well organized reference to the standard library. It also includes ANSI C99 features such as restrict pointers, complex functions, floating-point exceptions, and more.
What I like about it in particular is that ANSI C99 features are indicated with an asterisk. So as a C newcomer you will learn the most up-to-date version of the language, while as an advanced programmer you can easily find the recent extensions.
I highly recommend this book!

Handy to have around4
Here is a useful resource to have around whether you are new to programming or an old pro. It is all to easy to forget minor syntax details or function names. This little book solves that problem. Although some of the explanations are little glib and lacking in detail the important thing is that it has them all listed together with what they do. This means you can find or remind yourself of what you need. If more help is required then there is a plethora of places on the internet to assist you.

For newcomers to C I would still recommend getting this book. Having all the syntax details close to hand and in one place is very useful when building code for the first time. However I would say it is absolutely essential that you supplement it with the C bible 'The C programming Language' by Kernighan and Ritchie (The C Programming Language (2nd Edition)) or with another C text like 'A book on C' by Kelley and Pohl (A Book on C.: Programming in C.).

I gave this product four stars becuase it doesn't really do anything new and certainly not better than other C texts. Despite this it is very clear, concise and broad covering a lot of C in not a lot of space. This is useful if you quickly want to find something. Also the index is fantastic so no leafing through lots of text scanning for what you need.

If you require a neat little book that summarises the essential parts of C in just 120 pages then this is the book for you. If however you don't need a portable C library then I would say stick to the more traditional texts, since the detail in this one won't take you very far.

Complete, well-written and up-to-date5
This reference is remarkably complete, well-written and useful. It is probably not for the absolute beginner, but indispensable for those wanting a terse description of the C language and a well organized reference to the standard library. It also includes ANSI C99 features such as restrict pointers, complex functions, floating-point exceptions, and more. What I like about it in particular is that ANSI C99 features are indicated with an asterisk. So as a C newcomer you will learn the most up-to-date version of the language, while as an advanced programmer you can easily find the recent extensions. I highly recommend this book!