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