int nDigits = floor(log10(abs(the_integer))) + 1;
int get_int_len (int value){
int l=1;
while(value>9){ l++; value/=10; }
return l;
}
#include <limits.h>
#include <stdio.h>
int main()
{
printf("minimum int value = %d
"
"maximum int value = %d
"
"size of int in bytes = %zu
"
"size of int in bits = %zu",
INT_MIN, INT_MAX, sizeof(int),
sizeof(int) * CHAR_BIT);
}