I am having trouble understanding how exactly this code works:
int length = 1;
int x = 234567545;
while (x /= 10)
length++;
It is supposed to count the number of digits in the int variable. I don't get how the while loop is working. Does the loop just go to zero and stop by default? Also, why is the length starting at 1?