This program displays the number of digits present in the number that is entered through the input.

#include<stdio.h>
#include<conio.h>

void main()

{
unsigned long int num;
int i=0;
clrscr();
printf(“Enter the digitn”);
scanf(“%lu”,&num);
while(num!=0)
{
num=num/10;
++i;
}
printf(“Length=%d”,i);
getch();
}

People who read this also read:

  • No Related Posts

http://learnhacking.in/c-program-to-count-the-number-of-digits-in-the-entered-number/
  1. found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later

  2. auto shop says:

    Thanks for an idea, you sparked at thought from a angle I hadn’t given thoguht to yet. Now lets see if I can do something with it.

  3. Suzie Diniz says:

    I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work Look forward to reading more from you in the future.

  4. Ron Tedwater says:

    Really nice post,thank you

  5. Valuable info. Lucky me I found your site by accident, I bookmarked it.

  6. pharmacist says:

    Superb blog post, I have book marked this internet site so ideally I’ll see much more on this subject in the foreseeable future!

  7. maria andros says:

    Thanks for the post, keep posting stuff

  8. My sister gave me address to this site, thanks!

  9. again Very interesting blog post. shared it to my friends.

  10. This is a superb post Ethical Hacking .
    Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  11. In my offered opnion that even though it was undoubtedly a evaluated article I have come to the conclusion that there were still points to be made. I would like to hear your thoughts..and that of your other readers and whether or not they have come to the same conclusion. Cheers

  12. Constantly an awesome place once i drop by this blog and various sites you possess. Value the remarks.