C program to count number of digits in an integer

#include<stdio.h>
int main()
{
	long long num;
	int count=0;
	printf("Enter Number: ");
	scanf("%d",&num);

	while(num != 0)
	{
		num = num/10;
		count++;
	}

	printf("Digit: %d",count);

	return 0;
}

Output

Enter Number: 2569
Digit: 4