Friday, June 7, 2019

Write a program to count the digits in the given number



/* ***********************************************
    Write a program to count the digits in the given number

 date:07-06-2019
 created by:ANIL DURGAM

*****************************************************/
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,count=0,rem;
    printf("enter the number\n");
    scanf("%d",&a);
    do{

        a/=10;
    count++;

    }while(a>0);
    printf("number of digits==%d\n",count);



    return 0;
}

output:::


Note:

please send the questions which you are facing problem in C Language.

also write interview questions which are you faced in during interview related to C Language.

so i can try to solve them and send you back.

No comments:

Post a Comment

python class topic video