of identifier will be replaced before the program is compiled Occurrences that appear in string literals (strings in double-quotes) will not be replaced
we are using GCC GNU Compiler Collection (GCC) is a compiler system, which was created by the GNU Project and supports languages such as C (gcc), C++ (g++), and others %gcc –v gcc version 3.4.6
precision Maximum exponent 38 Maximum value 3.402823e+38 double 15 digits of precision Maximum exponent 308 Maximum value 1.797693e+308 long double 33 digits of precision Maximum exponent 4932 Maximum value 1.189731e+4932 *GCC on UH UNIX
numbers Floating-point numbers are approximately represented as binary numbers, with three parts: sign, exponent, and mantissa Because of round-off errors, floating-points are not exact, except for negative powers of two (0.5, 0.25, …)
mantissa times a power of ten Exponential notation: the x10n is substituted for e n Examples: 155.97 = 1.5597x102 = 1.5597e2 2.3 = 2.3 x 100 = 2.3e0
Parentheses: ( ) Innermost first 2 Unary operators: + - ++ -- (type) Right to left 3 Binary operators: * / % Left to right 4 Binary operators: + - Left to right 5 Assignment operators: = += -= *= /= %= Right to left
standard output (the screen) printf statements usually contain Control string: To label the output Conversion specifier: To format the output Argument: What needs to be printed
values with the corresponding sign # Prefix O when using octal specifier Prefix OX when using hexadecimal specifier Forces decimal point for floating points printed with e, E, f, g or G without a fractional part For G and g, trailer zeroes are not eliminated 0 Pad a field with leading zeroes