Lecture 1 - Slide 17 : 34
Fundamental types
The most fundamental types are numeric types
void
The no value type
Also used for
no parameters
,
void f(void)
, and for
generic pointer
,
void*
Integer types
int
,
long
and
short
,
signed
and
unsigned
The ranges depend on the implementation
Pointer types
Floating point types
float
and
double
,
long double
The ranges depend on the implementation
No boolean type in C89
Relies on certain conventions for use of numeric types as integer types
Character types
A
char
is a byte
Denoted with
single quotes
:
'A'
,
'a'
,
'\n'
,
'\141'
,
'\x61'
In reality small integers - signed or unsigned
Wide characters are also supported
C is a strongly typed, weakly checked language
[Dennis Ritchie]