On my computer,
int : 4 byte
long int : 4 byte
long long int : 8 byte
long double : 12 byte
unsigned long double : 12 byte
float : 4 byte
Which variable type should I use to keep numbers as big as 10^18?
For a precise representation, you can use
long long. It holds at most 2^63-1 on your box, which is >10^18.Any of the
floattypes would also work, but the representation will be approximate.