c++ sizeof int code example
Example: c++ length of int
unsigned int number_of_digits = 0;
do {
++number_of_digits;
n /= base;
} while (n);
unsigned int number_of_digits = 0;
do {
++number_of_digits;
n /= base;
} while (n);