Or you could use a char array. But you would have to handle addition,
subtraction etc. But then you could support an unlimited number
size. The big int libraries will do all this for you in a very
efficient way.
I have some library code to do arithmetic directly using ASCII strings
for input/output.
technically, it supports fairly large numbers (I forget the current max
size, and IIRC was something like 2048.2048 decimal digits or similar,
but it is adjustable anyways...).
more often, smaller fixed-size numbers are more useful though, say,
using a fixed 128 bit number or such...
but, yeah, between using a bignum library or writing it themselves,
either is an option.
supporting variable-sized numbers is more generic, but is a little
harder to do as efficiently, since the logic has to be generic for
whatever input size it is passed (and even then, there needs to be some
practical limit to how big a number can be).
some claim "the number can be as big as there is memory to store it",
but often even such an implementation would be impractical (one needs
temporary memory to store intermediate results, or memory may be
fragmented, or say only 16 bits are used to store the number of machine
words in the result, or...).
and really, what is the liklihood of a person needing
multi-billion-digit numbers anyways?...
"the number may be absurdly huge" or "the number may be up to 629k
digits" or similar is plenty reasonable, without invoking the "numbers
as big as memory" claim.
or such...