Читать книгу C für Dummies - Dan Gookin - Страница 3
Schummelseite NUMERISCHE DATENTYPEN
ОглавлениеDie folgende Tabelle zeigt C-Schlüsselwörter für numerische Daten, ihre Variablentypen und ihre Bereiche:
| Schlüsselwort | Variablentyp | Bereich | Benötigter Speicherplatz | 
|---|---|---|---|
| char | Zeichen | -128 bis 127 oder 0 bis 255, je nach Compiler | 1 Byte | 
| shortodershort int | kurze Ganzzahl | -32.768 bis 32.767 | 2 Bytes | 
| int | Ganzzahl | -2.147.483.648 bis 2.147.483.647 | 4 Bytes | 
| longoderlong int | lange Ganzzahl | -2.147.483.648 bis 2.147.483.647 | 4 Bytes | 
| long longoderlong long int | sehr lange Ganzzahl | -9.223.372.036.854.775.808 bis 9.223.372.036.854.775.807 | 8 Bytes | 
| unsigned char | vorzeichenloses Byte | 0 bis 255 | 1 Byte | 
| unsigned short | vorzeichenlose kurze Ganzzahl | 0 bis 65.535 | 2 Bytes | 
| unsigned int | vorzeichenlose Ganzzahl | 0 bis 4.294.967.295 | 4 Bytes | 
| unsigned long | vorzeichenlose lange Ganzzahl | 0 bis 4.294.967.295 | 4 Bytes | 
| unsigned long longoderunsigned long long int | vorzeichenlose sehr lange Ganzzahl | 0 bis 18.446.744.073.709.551.615 | 8 Bytes | 
| float | Fließkommazahl niedriger Genauigkeit (circa 7 Stellen) | ± 3,4 × 10-38 ± 3,4 × 1038 | 4 Bytes | 
| double | Fließkommazahl doppelter Genauigkeit (circa 15 Stellen) | ± 1,7 × 10-308 ± 1,7 × 10308 | 8 Bytes | 
