Tables

This book contained a number of tables, and you may not want to go searching through the entire text to find them. We've included the most useful tables here, along with a couple of new ones.

Table B.1. This list of all C operators—including a couple that were not discussed in this book—ranks them from highest precedence to the lowest.
Operator Precedence
OperatorsAssociativity
( ) [] - .Left to right
! -- ++ - + * & {} (type-cast) sizeof (+, - and * are all unary, not arithmetic)Right to left
* / %Left to right
+ -Left to right
<< >>Left to right
< <= > >=Left to right
== !=Left to right
&Left to right
^Left to right
|Left to right
&&Left to right
||Left to right
?:Left to right
= += -= *= /= %=Right to left
&= ^= |= <<= >>= 
,Left to right

Table B.2. These escape sequences have special meaning when used within strings.
Escape Characters
CharacterMeaning
Backspace
fnew page
Newline
Tab
Return
'single quotation mark
"double quotation mark

Table B.3. These signifiers act as placeholders for specific types of values. They are used in all the *f() functions: printf(), scanf(), fprintf(), sscanf(), sprintf(), and so forth.
printf(), scanf(), etc. Signifiers
SignifierMeaning
dinteger
ffloating point number
hdshort integer
ldlong integer
huunsigned short integer
uunsigned integer
luunsigned long integer
lfdouble
Lflong double (not always available)
ccharacter
sstring
ppointer

Table B.4. Choosing an appropriate number type affects the values a variable can store and how much memory it requires.
Number Types and Approximate Sizes
TypeMemory UsageRange of Values
short int2 bytes-32,768 to 32,767
Unsigned short int2 bytes0 to 65,535
Int4 bytes-2,147,483,648 to 2,147,483,647
unsigned int4 bytes0 to 4,294,967,295
long int4 bytes-2,147,483,648 to 2,147,483,647
unsigned long int4 bytes0 to 4,294,967,295
long long int8 bytes-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
unsigned long long int8 bytes0 to 18,446,744,073,709,551,615
Float4 bytes-1e38 to +1e38
Double8 bytes-1e308 to +1e308
long double8 bytes-1e308 to +1e308

Table B.5. In several places we stated that a character is actually an integer. Here are the corresponding decimal and character values. Those through number 32 are nonprinting characters.
ASCII Character Chart
DecimalASCIIDecimalASCIIDecimalASCIIDECIMALASCII
0NUL (null)38&76L114r
1SOH (start of heading)39'77M115s
2STX (start of text)40(78N116t
3ETX (end of text)41)79O117u
4EOT (end of transmission)42*80P118v
5ENQ (enquiry)43+81Q119w
6ACK (acknowledge)44,82R120x
7BEL (bell)45-83S121y
8BS (backspace)46.84T122z
9HT (horizontal tab)47/85U123{
10LF (line feed)48086V124|
11VT (vertical tab)49187W125}
12FF (form feed)50288X126~
13CR (carriage return)51389Y127DEL
14SO (shift out)52490Z  
15SI (shift in)53591[  
16DLE (data link escape)54692  
17DC1 (device control 1)55793]  
18DC2 (device control 2)56894^  
19DC3 (device control 3)57995_  
20DC4 (device control 4)58:96`  
21NAK (negative acknowledge)59;97a  
22SYN (synchronous idle)60<98b  
23ETB (end of transmission block)61=99c  
24CAN (cancel)62>100d  
25EM (end of medium)63?101e  
26SUB (substitute)64@102f  
27ESC (escape)65A103g  
28FS (file separator)66B104h  
29GS (group separator)67C105i  
30RS (record separator)68D106j  
31US (unit separator)69E107k  
32SP (space)70F108l  
33!71G109m  
34 72H110n  
35#73I111o  
36$74J112p  
37%75K113q  

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset