I am assuming you are talking about integers.
'Standard' integer types could represent 'largest' numbers according to their size, namely 2^
size-1.
So you have, typically:
size (bits) largest number
8 255
16 65535
32 4294967295
64 18446744073709551615
...
However, some languages provides
big integer
data types (other languages could have
libraries for the same purpose), 'theoretically not bounded' (see, for instance, this
Stack Overflow
question:
Is there an upper bound to BigInteger?[
^]).
Quote:
And What if programmer needs to store a larger number than the largest number of the variable can store ?
If possible, he/she defines its own datatype to cope with the number (or make some assumptions for simplify the problem and 'reduce' such number). Of course, together with the datatype the programmer has to implement all the operation he need to perform with it.