Is there a difference initializing using:
long a = 0;
and initializing using
long a = 0L;
I can't find this discussed in any of my reference books.
People use the second form to shut up over-zealous C parsers.
It's not superior to the first form.
But if you like a nice, quiet compile, go ahead and qualify the
constant with the exact type.
In some sense it makes sense to make specific assignments like that
because real error or warning messages can be harder to pick out if
you have 10,000 spurious warnings filling up your screen.
You'll see this even more often:
float f = 2.5f;
which (to me) makes very little sense for a constant that is not near
the edges of the type's dynamic range, though this is a very important
warning:
float f;
double d;
d = my_calculation();
f = d; /* I don't mind the warning here at all. It's useful. */