I\'m trying to find a way to find the length of an integer (number of digits) and then place it in an integer array. The assignment also calls for doing this without the use
The number of digits of an integer n in any base is trivially obtained by dividing until you're done:
n
unsigned int number_of_digits = 0; do { ++number_of_digits; n /= base; } while (n);