C Reference


Format Specifiers

Character Format
%c Character
%d Integer
%f Floating Point Integer
%i Integer
%E Scientific Notation
%e Scientific Notation
%g uses %f or %e
whichever is shorter
%G uses %f or %e
whichever is shorter
%o Unsigned Octal
%s String
%X Unsigned Hex
%x Unsigned Hex
%u Unsigned Integer
%p Displays matching
argument that's a
pointer.
%n Number of characters
written so far
%% output a %


The 32 C Keywords

Word What it is
auto a storage class specification
break a statement
case statement
char type specification
const Storage Class Modification
continue a statement
default a label
do a statement
double Type specifacation
else statement
enum type specification
extern storage class
float type specifier
for statement
goto statement
if statement
int type specification
long Type specification
register Storage Class Specification
return Statement
short type specification
signed type specification
sizeof Operator
static storage class specification
struct type specification
switch statement
typedef statement
union type specification
unsigned type specification
void type Specification
volatile storage class modification
while statement


Character Constants

Character Meaning of character
\a alert audibly
\b Backspace
\0 null
\\ backslash
\r carrage return
\n newline
\f form feed
\t tab
\v tab (vertical)
\" double quote
\' single quote
\N Octal Constant (N is variable)
\xN Hex Constant (N is variable

Operators

Operator What it is
|| Logical OR
! Logical negation
?: Conditional
>> right shift
<< left shift
&& Logical AND
^ OR (XOR) bitwise
~ compliment (bitwise)
< lessthan
> greater than
== equal to
++ increment
-- decrement
>= greater than, or equal to
<= less than, or equal to
= Assignment
+= Addition
-= subtraction
sizeof Size Of
| OR (bitwise)
& AND (bitwise)
*= multiplication
/= division
%= modulus (remainder)
!= not equal to
- Unary Minus