+ 3
Which datatype is used for storing 10 digit of number ?
int a = 500 // Compiling... :- No error int b = 6282828181 // Compiling... :- error How to resolve this problem ?
4 Respuestas
+ 9
long int b = 6282828181;
Assuming you are talking about C/C++
https://www.tutorialspoint.com/cplusplus/cpp_modifier_types.htm
+ 3
In Java and C/C++, you can use long data type.
For example,
long num = 7992838929;
+ 2
if you need numbers above what long can store (64bits) then take a look at BigIntegers, pretty much every language has a class like this which support numbers up to 2^(2^31-1) and can work for higher ones too
+ 2
Thanks guys