I want to store a number "x"
where 0<=x<=(10^18)
.
Which datatype should be used in C for storing such a large number?
I used "long int" but it's not working..
I want to store a number "x"
where 0<=x<=(10^18)
.
Which datatype should be used in C for storing such a large number?
I used "long int" but it's not working..
Use unsigned long long int
. It is supported in C99 or later, and as a compiler extension in some pre-1999 compilers. and it must be able to hold at least 1.8 * 10^19
values.