In the C99 standard they introduced long long. What is the purpose of this? In my (limited) C programming experience, I've only every seen a 4-byte int and an 8-byte long. For example, from Compiler Explorer:

If long is already 8 then, why is it necessary to add another long long type? What does this do to the compiler/architecture?
"If long is already 8" is not always true as much code exists that relies on 32-bit
longandintas 32 or 16 bits.Requiring
longas 64-bit would break code bases. This is a major concern.Yet requiring
longto remain 32-bit (and nolong long) would not make for access to standard 64-bit integers, hence a rationale forlong long.Allowing
longas either 32-bit or 64-bit (or others) allows for transition.Various functions pass in/return
longlikefseek(), ftell(). They benefit fromlongbeing more than 32-bit for large file support.Recommended practice encourages a wider
long: "The types used forsize_tandptrdiff_tshould not have an integer conversion rank greater than that ofsigned long intunless the implementation supports objects large enough to make this necessary." This relates to memory sizes exceeding 32-bit.Perhaps in the future an implementation may use
int/long/long long/intmax_tas 32/64/128/256 bits.IAC, I see fixed width types
intN_tincreasing in popularity overlongandlong long. I tend to use fixed width types orbool, (unsigned)char,int/unsigned,size_t, (u)intmax_tand leavesigned char, (unsigned)short, (unsigned)long, (unsigned)long longfor special cases.