long

suggest change

Denotes a signed integer type that is at least as long as int, and whose range includes at least -2147483647 to +2147483647, inclusive (that is, -(2^31 - 1) to +(2^31 - 1)). This type can also be written as long int.

const long approx_seconds_per_year = 60L*60L*24L*365L;

The combination long double denotes a floating point type, which has the widest range out of the three floating point types.

long double area(long double radius) {
    const long double pi = 3.1415926535897932385L;
    return pi*radius*radius;
}

When the long specifier occurs twice, as in long long, it denotes a signed integer type that is at least as long as long, and whose range includes at least -9223372036854775807 to +9223372036854775807, inclusive (that is, -(2^63 - 1) to +(2^63 - 1)).

// support files up to 2 TiB
const long long max_file_size = 2LL << 40;

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Basic type keywords:
* char
* int
* void
* float
* double
* long
* short
* bool

Table Of Contents
2 Basic type keywords
8 Arrays
11 Loops
39 Streams
51 Unions
56 Lambdas
60 SFINAE
62 RAII
67 Sorting
84 RTTI
87 Scopes
104 Profiling
107 Recursion
117 Iteration
125 Alignment
134 Semaphore
136 Debugging
139 Mutexes
142 decltype