Type System
C is a statically typed language, which means every object and function has a specific type that is known at compile-time, and the type of an object or function can not change.
The C type-system consists of the following types,
- Signed Integer Types
signed char
short
int
long
long long
- Unsigned Integer Types
unsigned char
unsigned short
unsigned int
unsigned long
unsigned long long
_Bool
- Real Floating Types
float
double
long double
- Complex Types
float _Complex
double _Complex
long double _Complex
- Special Types
void
char
Enumeration Types
- Derived Types
- Array TypesFunction TypesPointer TypesStructure TypesUnion Types
Additional Type Categorization
The types mentioned above can also be categorized based on certain shared properties,
- Character Types
char
signed char
unsigned char
- Integer Types
- Signed Integer TypesUnsigned Integer TypesCharacter TypesEnumeration Types
- Floating Types
- Real Floating TypesComplex Types
- Basic Types
char
Integer TypesFloating Types
- Real Types
- Integer TypesReal Floating Types
- Arithmetic Types
- Integer TypesFloating Types
- Scalar Types
- Arithmetic TypesPointer Types
- Aggregate Types
- Array TypesStructure Types
Further Reading