Long Vs. Int C/C++ – What’s The Point?

When writing in C or C++, every datatype is architecture and compiler specific. On one system int is 32, but you can find ones where it is 16 or 64; it’s not defined, so it’s up to compiler.

As for long and int, it comes from times, where standard integer was 16bit, where long was 32 bit integer – and it indeed was longer than int.

Leave a Comment