Variablen in C
Datentypen in C
Datentyp
- int: 2 Byte
- float: 4 Byte
- double: 2 x float, meist 8 Byte
- char: 1 Byte, einfache (!) Anführungszeichen
- void
- enum
Typische Größen der Datentypen
- Wieviel Speicherplatz in einer Programmierumgebung verwendet wird, kann man mit dem sizeof Operator feststellen.
- ANSI C: short int <= int < long int float <="double" <="long" double
-
short int - 2 bytes (16 bits)
int int - 2 bytes (16 bits)
long int - 4 bytes (32 bits)
signed char - 1 byte (Bereich -128 ... +127)
unsigned char - 1 byte (Bereich 0 ... 255)
float - 4 bytes
double - 8 bytes
long double - 8 bytes
Klassifikation
• C