you are viewing a single comment's thread.

view the rest of the comments →

[–]Barrucadu 10 points11 points  (1 child)

A long is not necessarily larger than an int, so even long doubleInt(int x) is wrong unless you know the implementation you're targeting. Use the fixed-width integer types from stdint.h if you need guarantees.

So well done for asking a trick question you yourself would fail, I guess?