what are default integer values?
c, int, long-integer, short
Solution
The type of integer literals given in base 10 is the first type in the following list in which their value can fit:
- `int`
- `long int`
- `long long int`
For octal and hexadecimal literals, unsigned types will be considered as well, in the following order:
- `int`
- `unsigned int`
- `long int`
- `unsigned long int`
- `long long int`
- `unsigned long long int`
You can specify a `u` suffix to force `unsigned` types, an `l` suffix to force `long` or `long long`, or an `ll` suffix to force `long long`.
Reference: C99, 6.4.4.1p5
Problem
I read somewhere that default floating point values like `1.2` are `double` not `float`. So what are default integer values like `6` , are they `short` , `int` or `long`?