Next: Operand Promotions, Previous: Assignment Type Conversions, Up: Type Conversions [Contents][Index]
When a function’s definition or declaration does not specify the type of an argument, that argument is passed without conversion in whatever type it has, with these exceptions:
char
or short
,
the call converts it automatically to int
(see Integer Data Types).8
In this example, the expression c
is passed as an int
:
char c = '$'; printf ("Character c is '%c'\n", c);
float
, the call converts it automatically to
double
.
On an embedded controller where char
or short
is the same width as int
, unsigned char
or unsigned short
promotes to unsigned int
, but that
never occurs in GNU C on real computers.