38

I don't know this type. Is that the biggest one from all? I think it is an integer type, right? Or is it a floating point thing? Bigger than double?

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
openfrog
  • 40,201
  • 65
  • 225
  • 373

2 Answers2

42

According to C99 standard, long long is an integer type which is at least 64-bit wide. There are two integer 64-bit types specified: long long int and unsigned long long int

So, yes, this is the biggest integer type specified by C language standard (C99 version).

There is also long double type specified by C99. It's an extended precision floating point numeric data type long for 80-bits on most popular x86-based platforms and implementations of C language.

mloskot
  • 37,086
  • 11
  • 109
  • 136
  • 2
    "long double" may also represent the (eminently needed) [128-bit quadruple-precision floating point type](https://en.wikipedia.org/wiki/Quadruple-precision_floating-point_format) in some cases. C types are and stay an epic "no assumptions because muh flexibility" ridiculous mess. – David Tonhofer Jun 29 '17 at 23:08
  • Quote from the standard (page 38): "C99 has therefore adopted long long as the name of an integer type with at least 64 bits of precision. People can and do argue about the particular choice of name, but it has been difficult to pick a clearly better name early enough, and by now it is fairly common practice, and may be viewed as one of the least bad choices." – Isacc Barker Jun 22 '23 at 23:25
13

The short and simple is that a long long is an int that is at least 64 bits wide. The rationale for this is here. Basically, it is a response to 64 bit architecture and backwards compatibility. And the name long long was deemed the least bad of all possibilities by the standards committee.

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
hurricaneMitch
  • 163
  • 1
  • 8