Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

wap in c to accept a number display the total count of digit

Answer Posted / vaibhav

#include<stdio.h>
#include<conio.h>
void main()
{
int no,t,cnt=0;
clrscr();
printf("\n enter the no.");
scanf("%d",&no);
while(no!=0)
{
t=no%10;
no=no/10;
cnt++;
}
printf("\nTotal count of digit is%d",cnt);
getch();
}

Is This Answer Correct ?    19 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure in c explain with example?

1214


Explain how can a program be made to print the line number where an error occurs?

1282


Are the variables argc and argv are local to main?

1361


What do you mean by Recursion Function?

1179


What is the 'named constructor idiom'?

1148


What is the use of sizeof?

1064


What does typeof return in c?

1161


Here is a neat trick for checking whether two strings are equal

1074


What are categories used for in c?

1152


What is a lvalue

1147


What are header files why are they important?

1154


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1110


What's the total generic pointer type?

1109


What is sizeof array in c?

1114


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2342