3 / 3
Nov 2015

Problem faced

On my 64-bit Linux, in C with gcc, the size of long int is 64-bits, but after getting a lot of WA I found that on SPOJ, the size of long int in spoj is 32-bits.

So I urgently want to know about exactly what are the size of all variables in C with gcc.

Thank you...

  • created

    Nov '15
  • last reply

    Nov '15
  • 2

    replies

  • 1.3k

    views

  • 2

    users

  • 1

    link

Note the words that they use quite a bit, "at least". There is nothing saying that a long int cannot be 64-bit but the standard just says that it must be at least 32-bit.

If you want a 64-bit signed integer you must use long long.

Thank you!

Maybe next time I should have more tries... smile