Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does LL mean?

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?

like image 340
Luchian Grigore Avatar asked Mar 22 '13 16:03

Luchian Grigore


1 Answers

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
...
like image 88
Joseph Mansfield Avatar answered Oct 06 '22 18:10

Joseph Mansfield