Programming in C

(Barry) #1
428 Appendix A C Language Summary

If the floating-point constant is immediately followed by the letter e(or E) and an
optionally signed integer, the constant is expressed in scientific notation.This integer (the
exponent) represents the power of 10 by which the value preceding the letter e(the
mantissa) is multiplied (for example,1.5e–2represents 1.5 × 10 –2or .015).
A hexadecimalfloating constant consists of a leading 0xor 0X, followed by one or
more decimal or hexadecimal digits, followed by a por P, followed by an optionally
signed binary exponent. For example, 0x3p10 represents the value 3 × 210.
Floating-point constants are treated as doubleprecision values by the compiler.The
suffix letter for Fcan be added to specify a floatconstant instead of a doublecon-
stant.The suffix letter lor Lcan be added to specify a long doubleconstant.

3.3 Character Constants


A character enclosed within single quotation marks is a character constant. How the
inclusion of more than one character inside the single quotation marks is handled is
implementation-defined. A universal character (Section 1.2.1) can be used in a character
constant to specify a character not included in the standard character set.

3.3.1 Escape Sequences
Special escape sequences are recognized and are introduced by the backslash character.
These escape sequences are listed in Table A.3.

Ta ble A.3 Special Escape Sequences
Character Meaning
\a Audible alert
\b Backspace
\f Form feed
\n Newline
\r Carriage return
\t Horizontal tab
\v Ve r tical tab
\\ Backslash
\" Double quote
\' Single quote
\? Question mark
\nnn Octal character value
\unnnn Universal character name
\Unnnnnnnn Universal character name
\xnn Hexadecimal character value

20 0672326663 AppA 6/10/04 2:01 PM Page 428

Free download pdf