They are the same. Since long
is a modifier for int
by default, int
can be omitted. The same applies to short
and short int
, unsigned
and unsigned int
, etc.
You need to understand that long
, short
and unsigned
are type modifiers, not the types themselves, unlike int
, char
, double
, etc.
source share