4

I came accross this statement:

time_t time = x / 1000LL;

So what does this LL actually mean?

anupamb
  • 472
  • 4
  • 13
  • i think thats the suffix for long long. – Daniel A. White Jan 27 '16 at 01:57
  • 4
    Please use the proper tag. I'm hesitant to close the question because [this duplicate](http://stackoverflow.com/questions/15575054/what-does-ll-mean) is C++ specifically, while [this one](http://stackoverflow.com/questions/7036056/what-do-0ll-or-0x0ul-mean) is C. `YEAR_OFFSET` is a completely different question and I have no idea what you mean by it offhand. – chris Jan 27 '16 at 02:00
  • @anupamb don't forget to add an answer as accepted if your problem is soved ;-) – Magix Jan 27 '16 at 02:38
  • Does this answer your question? [What do 0LL or 0x0UL mean?](https://stackoverflow.com/questions/7036056/what-do-0ll-or-0x0ul-mean) – phuclv Sep 03 '20 at 23:52

1 Answers1

7

Copy-pasted from this question, which seems to be the exact same one with the ULL suffix :

From the gcc manual:

ISO C99 supports data types for integers that are at least 64 bits wide, and as an extension GCC supports them in C90 mode and in C++. Simply write long long int for a signed integer, or unsigned long long int for an unsigned integer. To make an integer constant of type long long int, add the suffix LL to the integer. To make an integer constant of type unsigned long long int, add the suffix ULL to the integer.

It, indeed, is a suffix for the long long int type.

Community
  • 1
  • 1
Magix
  • 4,989
  • 7
  • 26
  • 50
  • 3
    In other words, it gives the constant the type of `long long int`. By default, `1000` would have the type `int`. It's logically equivalent to `(long long int)1000` – Adam Jan 27 '16 at 02:01
  • 1
    If you can copy and paste an answer from another question and it answers this question you should flag this as a duplicate – NathanOliver Jan 27 '16 at 02:11
  • Well, it is not a strict duplicate as this question asks for the `LL` suffix as the one I copy-pasted from talks about the `ULL` suffix, which is not the same. I agree that a simple google search would have been enough to answer this anyway... and flagging as a duplicate is debatable but seems totally acceptable. – Magix Jan 27 '16 at 02:14