Types in C
----------
Five types of variable - char, int, float, double, enum
Qualifiers modify basic types - short, long, signed, unsigned
Formats
-------
%c	character
%i,%d 	decimal integer
%u 	decimal integer unsigned
%f 	floating point
%o	octal, unsigned
%x	hex, integer unsigned
%e	scientific format
%f	decimal number
%g	uses shortest of %e or %f
%s	string
%n	a count of the number of printed characters

Escape sequences
----------------
\a	audible alert
\b	backspace
\f	form feed
\n	newline
\r	charage return
\t	horizontal tab 
\v	vertical tab
\\	backslash
\'	single quote
\"	double quote
\?	question mark

Operators
---------
This list is order of precedence. Operators are
processed in the order of precedence, then 
associativity determines how to process operations
with equal precedence.

Class          Operators        Associativity
---------------------------------------------
primary         () [] -> .      left to right
unary           cast operator
(only take one  sizeof
operand)        & (address of)  right to left
                * (dereference)
                - + (e.g. +x -x)
                ~ 
                ++ -- (increment/decrement) 
                ! (logical negation)
multiplicative  * /             left to right
                %
additive        + -             left to right
Shift           << >>           left to right
relational      < <= > >=       left to right
equality        == !=           left to right
bitwise AND     &               left to right
bitwise exclusive OR    ^       left to right
bitwise inclusive OR    |       left to right
logical AND     &&              left to right
logical OR      ||              left to right
conditional     ? :             right to left
assignment      = += -= *=      right to left
                /= %= >>= <<=
                &= ^=
comma           '               left to right

Description of operators
========================

Unary operators (only take one operand)
----------------------------------------

Operator        Symbol  Form    Operation
-----------------------------------------
unary minus     -       -x      negation of x
unary plus      +       +x      value of operand

Binary operators
----------------
Operator        Symbol  Form    Operation
-----------------------------------------
multiplication  *       x*y     x time y
division        /       x/y     x divided by y
remainder*       %       x % y   remainded of x/y
addition        +       x + y
subtraction     -       x - y
* only works with integer operands
N.B. if x and y are integer the result will be integer too!!

Arithmetic assignment operators
-------------------------------
Operator        Symbol  Form    Operation
-----------------------------------------
assign          =       a = b   put value of b into a
add assign      +=      a += b  put value of a+b into a
subtract assign -=      a -= b  put value of a-b into a
mutiply assign  *=      a *= b  put value of a*b into a
divide assign   /=      a /= b  put value of a/b into a
remainder assign %=     a %= b  put the value of a%b into a

Increment and decrement operators (see operators.c)
---------------------------------
Operator        Symbol  Form    Operation
-----------------------------------------
postfix         ++      a++     get value of a then increment
increment
postfix         --      a--     get value of a then decrement
decrement
prefix          ++      ++a     increment value of a then get value
increment
prefix          --      --a     increment value of a then get value
decrement
These operators have the side effect that they change the value of
the variable. NB the precedence works from right to left.

The comma operator
------------------
Operator        Symbol  Form    Operation
-----------------------------------------
comma           ,       a , b   evaluate a, evaluate b, result is b
The compiler works from left to right

Relational operators
--------------------
Operator        Symbol  Form    Operation
-----------------------------------------
greater than    >       a > b   1 if a > b otherwise 0.
less than       <       a < b   1 if a < b otherwise 0.
greater than    >=      a >= b  1 if a >= b otherwise 0.
or equal to
less than or    <=      a <= b  1 if a <= b otherwise 0.
equal to
equal to        ==      a == b  1 if a == b otherwise 0.
not equal to    !=      a != b  1 if a != b otherwise 0.

Logical operators
-----------------
Operator        Symbol  Form    Operation
-----------------------------------------
logical AND     &&      a && b  1 if a and b non zero else 0
logical OR      ||      a || b  1 if a or b non zero else 0
logical negation !      !a      1 if a is 0 else 0.
