← Back to Question List
C Code Walkthrough #49
Counting Digits by Dividing
📄 Code
Read carefully — what does this print?1#include <stdio.h>23int main() {4 int n = 12345, count = 0;5 while (n > 0) {6 n /= 10;7 count++;8 }9 printf("%d\n", count);10 return 0;11}