C in a Nutshell: The Definitive Reference

C in a Nutshell: The Definitive Reference

Peter Prinz, Tony Crawford

Language: English

Pages: 824

ISBN: 1491904755

Format: PDF / Kindle (mobi) / ePub

C in a Nutshell: The Definitive Reference

Peter Prinz, Tony Crawford

Language: English

Pages: 824

ISBN: 1491904755

Format: PDF / Kindle (mobi) / ePub


The new edition of this classic O’Reilly reference provides clear, detailed explanations of every feature in the C language and runtime library, including multithreading, type-generic macros, and library functions that are new in the 2011 C standard (C11). If you want to understand the effects of an unfamiliar function, and how the standard library requires it to behave, you’ll find it here, along with a typical example.

Ideal for experienced C and C++ programmers, this book also includes popular tools in the GNU software collection. You’ll learn how to build C programs with GNU Make, compile executable programs from C source code, and test and debug your programs with the GNU debugger.

In three sections, this authoritative book covers:

  • C language concepts and language elements, with separate chapters on types, statements, pointers, memory management, I/O, and more
  • The C standard library, including an overview of standard headers and a detailed function reference
  • Basic C programming tools in the GNU software collection, with instructions on how use them with the Eclipse IDE

Programming with Visual C++: Concepts and Projects

MUD Game Programming (Premier Press Game Development)

D Cookbook

iOS 8 for Programmers: An App-Driven Approach with Swift (3rd Edition) (Deitel Developer Series)

F# Deep Dives

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

type-generic macros are described in the section on tgmath.h in Chapter 15. Categories of floating-point values C99 defines five kinds of values for the real floating-point types, with distinct integer macros to designate them (see the section on math.h in Chapter 15): FP_ZERO FP_NORMAL FP_SUBNORMAL FP_INFINITE FP_NAN These classification macros, and the function-like macros listed in Table 16-7, are defined in the header math.h. The argument of each of the function-like macros must

vprintf(), vfprintf(), vsprintf(), and vsnprintf(); the printf() functions for wide characters that use the type va_list for the variable arguments, vwprintf(), vfwprintf(), and vswprintf(); the formatted input functions scanf(), sscanf(), and fscanf() Name putc Synopsis Writes a character to a file #include intputc( int c, FILE *fp ); The macro putc() is similar to the function fputc(). It writes one character to the current file position of the specified FILE pointer.

same rank as its corresponding integer type (see "Enumerated Types" in Chapter 2). The floating-point types are ranked in the following order: float < double < long double The lowest-ranked floating-point type, float, has a higher rank than any integer type. Every complex floating-point type has the same rank as the type of its real and imaginary parts. Integer Promotion In any expression, you can always use a value whose type ranks lower than int in place of an operand of

object files in the project like this: %.o: %.c $(CC) $(CFLAGS) -o $@ -c $< And if a certain object needs to be handled differently for some reason, you can put a static pattern rule for that object file in the makefile as well. make then applies the static rule for targets explicitly named in it, and the implicit rule for all other .o files. Also, make refrains from announcing an error if any object file's implicit prerequisite does not exist. The percent sign is usually used only once in

comma operator) Thus the expression ++i < 100 ? f(i++) : (i = 0) is permissible, as there is a sequence point between the first modification of i and whichever of the other two modifications is performed. Operator Precedence and Associativity An expression may contain several operators. In this case, the precedence of the operators determines which part of the expression is treated as the operand of each operator. For example, in keeping with the customary rules of arithmetic, the

Download sample

Download