ASCII (American Standard Code for Information Interchange ) to kod liczbowy, który jest przyporządkowany każdemu znaku. W C++ litery, cyfry, znaki przystankowe, znaki niedrukowalne takie jak spacja czy enter przechowujemy w zmiennej typu char, mamy wtedy do dyspozycji znaki z przedziału [0; 127], oraz w rozszerzonym typie unsigned char, tu znaki zawierają się w przedziale[0; 255].
ASCII dziesiętnie | ASCII szesnastkowo | ASCII ósemkowo | znak | opis |
---|---|---|---|---|
0 | 0 | 0 | Nul | zero |
1 | 1 | 1 | SQH | początek nagłówka |
2 | 2 | 2 | STX | początek tekstu |
3 | 3 | 3 | ETX | koniec tekstu |
4 | 4 | 4 | EOT | koniec transmisji |
5 | 5 | 5 | ENQ | wywołanie stacji |
6 | 6 | 6 | ACK | potwierdzenie |
7 | 7 | 7 | BEL | dzwonek |
8 | 8 | 10 | BS | backspace |
9 | 9 | 11 | HT | tabulacja pozioma |
10 | a | 12 | LF | przesunięcie o jeden wiersz |
11 | b | 13 | FT | tabulacja pionowa |
12 | c | 14 | FF | przesunięcie o jedną stronę |
13 | d | 15 | CR | powrót karetki - ENTER |
14 | e | 16 | SO | wyjście |
15 | f | 17 | SI | wejście |
16 | 10 | 20 | DLE | pominięcie znaków sterujących |
17 | 11 | 21 | DC1 | sterowanie urządzenia 1 |
18 | 12 | 22 | DC2 | sterowanie urządzenia 2 |
19 | 13 | 23 | DC3 | sterowanie urządzenia 3 |
20 | 14 | 24 | DC4 | sterowanie urządzenia 4 |
21 | 15 | 25 | NAC | potwierdzenie negatywne |
22 | 16 | 26 | SYN | synchronizacja |
23 | 17 | 27 | ETB | koniec bloku |
24 | 18 | 30 | CAN | anulowanie |
25 | 19 | 31 | EM | koniec nośnika |
26 | 1a | 32 | SUB | zastąpienie |
27 | 1b | 33 | ESC | escape |
28 | 1c | 34 | FS | poprzedza dane alfanumeryczne |
29 | 1d | 35 | GS | poprzedza dane binarne |
30 | 1e | 36 | RS | separator rekordów |
31 | 1f | 37 | US | separator pozycji |
32 | 20 | 40 | SP | spacja |
33 | 21 | 41 | ! | |
34 | 22 | 42 | " | |
35 | 23 | 43 | # | |
36 | 24 | 44 | $ | |
37 | 25 | 45 | % | |
38 | 26 | 46 | & | |
39 | 27 | 47 | ' | |
40 | 28 | 50 | ( | |
41 | 29 | 51 | ) | |
42 | 2a | 52 | * | |
43 | 2b | 53 | + | |
44 | 2c | 54 | , | |
45 | 2d | 55 | - | |
46 | 2e | 56 | . | |
47 | 2f | 57 | / | |
48 | 30 | 60 | 0 | |
49 | 31 | 61 | 1 | |
50 | 32 | 62 | 2 | |
51 | 33 | 63 | 3 | |
52 | 34 | 64 | 4 | |
53 | 35 | 65 | 5 | |
54 | 36 | 66 | 6 | |
55 | 37 | 67 | 7 | |
56 | 38 | 70 | 8 | |
57 | 39 | 71 | 9 | |
58 | 3a | 72 | : | |
59 | 3b | 73 | ; | |
60 | 3c | 74 | < | |
61 | 3d | 75 | = | |
62 | 3e | 76 | > | |
63 | 3f | 77 | ? | |
64 | 40 | 100 | @ | |
65 | 41 | 101 | A | |
66 | 42 | 102 | B | |
67 | 43 | 103 | C | |
68 | 44 | 104 | D | |
69 | 45 | 105 | E | |
70 | 46 | 106 | F | |
71 | 47 | 107 | G | |
72 | 48 | 110 | H | |
73 | 49 | 111 | I | |
74 | 4a | 112 | J | |
75 | 4b | 113 | K | |
76 | 4c | 114 | L | |
77 | 4d | 115 | M | |
78 | 4e | 116 | N | |
79 | 4f | 117 | O | |
80 | 50 | 120 | P | |
81 | 51 | 121 | Q | |
82 | 52 | 122 | R | |
83 | 53 | 123 | S | |
84 | 54 | 124 | T | |
85 | 55 | 125 | U | |
86 | 56 | 126 | V | |
87 | 57 | 127 | W | |
88 | 58 | 130 | X | |
89 | 59 | 131 | Y | |
90 | 5a | 132 | Z | |
91 | 5b | 133 | [ | |
92 | 5c | 134 | \ | |
93 | 5d | 135 | ] | |
94 | 5e | 136 | ^ | |
95 | 5f | 137 | _ | |
96 | 60 | 140 | ` | |
97 | 61 | 141 | a | |
98 | 62 | 142 | b | |
99 | 63 | 143 | c | |
100 | 64 | 144 | d | |
101 | 65 | 145 | e | |
102 | 66 | 146 | f | |
103 | 67 | 147 | g | |
104 | 68 | 150 | h | |
105 | 69 | 151 | i | |
106 | 6a | 152 | j | |
107 | 6b | 153 | k | |
108 | 6c | 154 | l | |
109 | 6d | 155 | m | |
110 | 6e | 156 | n | |
111 | 6f | 157 | o | |
112 | 70 | 160 | p | |
113 | 71 | 161 | q | |
114 | 72 | 162 | r | |
115 | 73 | 163 | s | |
116 | 74 | 164 | t | |
117 | 75 | 165 | u | |
118 | 76 | 166 | v | |
119 | 77 | 167 | w | |
120 | 78 | 170 | x | |
121 | 79 | 171 | y | |
122 | 7a | 172 | z | |
123 | 7b | 173 | { | |
124 | 7c | 174 | | | |
125 | 7d | 175 | } | |
126 | 7e | 176 | ~ | |
127 | 7f | 177 | ||
128 | 80 | 200 | € | |
129 | 81 | 201 | | |
130 | 82 | 202 | ‚ | |
131 | 83 | 203 | | |
132 | 84 | 204 | „ | |
133 | 85 | 205 | … | |
134 | 86 | 206 | † | |
135 | 87 | 207 | ‡ | |
136 | 88 | 210 | | |
137 | 89 | 211 | ‰ | |
138 | 8a | 212 | Š | |
139 | 8b | 213 | ‹ | |
140 | 8c | 214 | Ś | |
141 | 8d | 215 | Ť | |
142 | 8e | 216 | Ž | |
143 | 8f | 217 | Ź | |
144 | 90 | 220 | | |
145 | 91 | 221 | ‘ | |
146 | 92 | 222 | ’ | |
147 | 93 | 223 | “ | |
148 | 94 | 224 | ” | |
149 | 95 | 225 | • | |
150 | 96 | 226 | – | |
151 | 97 | 227 | — | |
152 | 98 | 230 | | |
153 | 99 | 231 | ™ | |
154 | 9a | 232 | š | |
155 | 9b | 233 | › | |
156 | 9c | 234 | ś | |
157 | 9d | 235 | ť | |
158 | 9e | 236 | ž | |
159 | 9f | 237 | ź | |
160 | a0 | 240 | ||
161 | a1 | 241 | ˇ | |
162 | a2 | 242 | ˘ | |
163 | a3 | 243 | Ł | |
164 | a4 | 244 | ¤ | |
165 | a5 | 245 | Ą | |
166 | a6 | 246 | ¦ | |
167 | a7 | 247 | § | |
168 | a8 | 250 | ¨ | |
169 | a9 | 251 | © | |
170 | aa | 252 | Ş | |
171 | ab | 253 | « | |
172 | ac | 254 | ¬ | |
173 | ad | 255 | | |
174 | ae | 256 | ® | |
175 | af | 257 | Ż | |
176 | b0 | 260 | ° | |
177 | b1 | 261 | ± | |
178 | b2 | 262 | ˛ | |
179 | b3 | 263 | ł | |
180 | b4 | 264 | ´ | |
181 | b5 | 265 | µ | |
182 | b6 | 266 | ¶ | |
183 | b7 | 267 | · | |
184 | b8 | 270 | ¸ | |
185 | b9 | 271 | ą | |
186 | ba | 272 | ş | |
187 | bb | 273 | » | |
188 | bc | 274 | Ľ | |
189 | bd | 275 | ˝ | |
190 | be | 276 | ľ | |
191 | bf | 277 | ż | |
192 | c0 | 300 | Ŕ | |
193 | c1 | 301 | Á | |
194 | c2 | 302 | Â | |
195 | c3 | 303 | Ă | |
196 | c4 | 304 | Ä | |
197 | c5 | 305 | Ĺ | |
198 | c6 | 306 | Ć | |
199 | c7 | 307 | Ç | |
200 | c8 | 310 | Č | |
201 | c9 | 311 | É | |
202 | ca | 312 | Ę | |
203 | cb | 313 | Ë | |
204 | cc | 314 | Ě | |
205 | cd | 315 | Í | |
206 | ce | 316 | Î | |
207 | cf | 317 | Ď | |
208 | d0 | 320 | Đ | |
209 | d1 | 321 | Ń | |
210 | d2 | 322 | Ň | |
211 | d3 | 323 | Ó | |
212 | d4 | 324 | Ô | |
213 | d5 | 325 | Ő | |
214 | d6 | 326 | Ö | |
215 | d7 | 327 | × | |
216 | d8 | 330 | Ř | |
217 | d9 | 331 | Ů | |
218 | da | 332 | Ú | |
219 | db | 333 | Ű | |
220 | dc | 334 | Ü | |
221 | dd | 335 | Ý | |
222 | de | 336 | Ţ | |
223 | df | 337 | ß | |
224 | e0 | 340 | ŕ | |
225 | e1 | 341 | á | |
226 | e2 | 342 | â | |
227 | e3 | 343 | ă | |
228 | e4 | 344 | ä | |
229 | e5 | 345 | ĺ | |
230 | e6 | 346 | ć | |
231 | e7 | 347 | ç | |
232 | e8 | 350 | č | |
233 | e9 | 351 | é | |
234 | ea | 352 | ę | |
235 | eb | 353 | ë | |
236 | ec | 354 | ě | |
237 | ed | 355 | í | |
238 | ee | 356 | î | |
239 | ef | 357 | ď | |
240 | f0 | 360 | đ | |
241 | f1 | 361 | ń | |
242 | f2 | 362 | ň | |
243 | f3 | 363 | ó | |
244 | f4 | 364 | ô | |
245 | f5 | 365 | ő | |
246 | f6 | 366 | ö | |
247 | f7 | 367 | ÷ | |
248 | f8 | 370 | ř | |
249 | f9 | 371 | ů | |
250 | fa | 372 | ú | |
251 | fb | 373 | ű | |
252 | fc | 374 | ü | |
253 | fd | 375 | ý | |
254 | fe | 376 | ţ | |
255 | ff | 377 | ˙ |