Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

C Program to Count number of digits in number without using mod operator in C

#include<stdio.h>
#include<string.h>
void main()
{
int num,digits;
char ch[10];

printf("nEnter the Number : ");
scanf("%d",&num);

sprintf(ch,"%d",num);

digits = strlen(ch);

printf("nNumber of Digits : %d",digits);

getch();
}