Appendix E. THE ASCII CHARACTER SET

I l @ ve RuBoard

Appendix E. THE ASCII CHARACTER SET

Computers store characters by using a numeric code. The ASCII code (American Standard Code for Information Interchange) is the most commonly used code in the United States. C lets you represent most single characters directly, by including the character in single quotation marks, as in 'A' for the A character. You can also represent a single character by using the octal or hex code preceded by a backslash; for example, '\012' and '\0xa' both represent the linefeed (LF) character. Such escape sequences can also be part of a string, as in "Hello,\012my dear" .

When used as a prefix in the following table, the ^ character denotes using the Ctrl key.

Decimal Octal Hex Binary Character ASCII Name
00000000 ^@ NUL
1 01 0x1 00000001 ^A SOH
2 02 0x2 00000010 ^B STX
3 03 0x3 00000011 ^C ETX
4 04 0x4 00000100 ^D EOT
5 05 0x5 00000101 ^E ENQ
6 06 0x6 00000110 ^F ACK
7 07 0x7 00000111 ^G BEL
8 010 0x8 00001000 ^H BS
9 011 0x9 00001001 ^I, tab HT
10 012 0xa 00001010 ^J LF
11 013 0xb 00001011 ^K VT
12 014 0xc 00001100 ^L FF
13 015 0xd 00001101 ^M CR
14 016 0xe 00001110 ^N SO
15 017 0xf 00001111 ^O SI
16 020 0x10 00010000 ^P DLE
17 021 0x11 00010001 ^Q DC1
18 022 0x12 00010010 ^R DC2
19 023 0x13 00010011 ^S DC3
20 024 0x14 00010100 ^T DC4
21 025 0x15 00010101 ^U NAK
22 026 0x16 00010110 ^V SYN
23 027 0x17 00010111 ^W ETB
24 030 0x18 00011000 ^X CAN
25 031 0x19 00011001 ^Y EM
26 032 0x1a 00011010 ^Z SUB
27 033 0x1b 00011011 ^[, esc ESC
28 034 0x1c 00011100 ^\ FS
29 035 0x1d 00011101 ^] GS
30 036 0x1e 00011110 ^^ RS
31 037 0x1f 00011111 ^_ US
32 040 0x20 00100000 space SP
33 041 0x21 00100001 !  
34 042 0x22 00100010 "  
35 043 0x23 00100011 #  
36 044 0x24 00100100 $  
37 045 0x25 00100101 %  
38 046 0x26 00100110 &  
39 047 0x27 00100111 '  
40 050 0x28 00101000 (  
41 051 0x29 00101001 )  
42 052 0x2a 00101010 *  
43 053 0x2b 00101011 +  
44 054 0x2c 00101100 '  
45 055 0x2d 00101101 -  
46 056 0x2e 00101110 .  
47 057 0x2f 00101111 /  
48 060 0x30 00110000  
49 061 0x31 00110001 1  
50 062 0x32 00110010 2  
51 063 0x33 00110011 3  
52 064 0x34 00110100 4  
53 065 0x35 00110101 5  
54 066 0x36 00110110 6  
55 067 0x37 00110111 7  
56 070 0x38 00111000 8  
57 071 0x39 00111001 9  
58 072 0x3a 00111010 :  
59 073 0x3b 00111011 ;  
60 074 0x3c 00111100 <  
61 075 0x3d 00111101 =  
62 076 0x3e 00111110 >  
63 077 0x3f 00111111 ?  
64 0100 0x40 01000000 @  
65 0101 0x41 01000001 A  
66 0102 0x42 01000010 B  
67 0103 0x43 01000011 C  
68 0104 0x44 01000100 D  
69 0105 0x45 01000101 E  
70 0106 0x46 01000110 F  
71 0107 0x47 01000111 G  
72 0110 0x48 01001000 H  
73 0111 0x49 01001001 I  
74 0112 0x4a 01001010 J  
75 0113 0x4b 01001011 K  
76 0114 0x4c 01001100 L  
77 0115 0x4d 01001101 M  
78 0116 0x4e 01001110 N  
79 0117 0x4f 01001111 O  
80 0120 0x50 01010000 P  
81 0121 0x51 01010001 Q  
82 0122 0x52 01010010 R  
83 0123 0x53 01010011 S  
84 0124 0x54 01010100 T  
85 0125 0x55 01010101 U  
86 0126 0x56 01010110 V  
87 0127 0x57 01010111 W  
88 0130 0x58 01011000 X  
89 0131 0x59 01011001 Y  
90 0132 0x5a 01011010 Z  
91 0133 0x5b 01011011 [  
92 0134 0x5c 01011100 \  
93 0135 0x5d 01011101 ]  
94 0136 0x5e 01011110 ^  
95 0137 0x5f 01011111 _  
96 0140 0x60 01100000 '  
97 0141 0x61 01100001 a  
98 0142 0x62 01100010 b  
99 0143 0x63 01100011 c  
100 0144 0x64 01100100 d  
101 0145 0x65 01100101 e  
102 0146 0x66 01100110 f  
103 0147 0x67 01100111 g  
104 0150 0x68 01101000 h  
105 0151 0x69 01101001 i  
106 0152 0x6a 01101010 j  
107 0153 0x6b 01101011 k  
108 0154 0x6c 01101100 l  
109 0155 0x6d 01101101 m  
110 0156 0x6e 01101110 n  
111 0157 0x6f 01101111 o  
112 0160 0x70 01110000 p  
113 0161 0x71 01110001 q  
114 0162 0x72 01110010 r  
115 0163 0x73 01110011 s  
116 0164 0x74 01110100 t  
117 0165 0x75 01110101 u  
118 0166 0x76 01110110 v  
119 0167 0x77 01110111 w  
120 0170 0x78 01111000 x  
121 0171 0x79 01111001 y  
122 0172 0x7a 01111010 z  
123 0173 0x7b 01111011 {  
124 0174 0x7c 01111100  
125 0175 0x7d 01111101 }  
126 0176 0x7e 01111110 ~  
127 0177 0x7f 01111111 del, rubout  
I l @ ve RuBoard


C++ Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 314
Authors: Stephen Prata

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net