Is LL
defined anywhere in the standard (hard term to come by)?
ideone accepts the code
int main()
{
std::cout << sizeof(0LL) << std::endl;
std::cout << sizeof(0);
}
and prints
8
4
But what does it mean?
0LL
is an integer literal. It's suffix is LL
which determines the possible set of types that it might have. For a decimal constant, the type will be long long int
. For an octal or hexadecimal constant, the type will be long long int
or unsigned long long int
if necessary. In the case of 0LL
, the literal is of type long long int
.
The type of an integer literal is the first of the corresponding list in Table 6 in which its value can be represented.
Table 6 - Types of integer constants
Suffix Decimal constants Octal or hexadecimal constant ... ll or LL long long int long long int unsigned long long int ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With