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 / govind279

#include<stdio.h>
int main()
{
int n,m,sum=0;
scanf("%d",&n);
for(m=0;((m=n%10)!=0);n=(n/10))
sum+=m;
printf("count is %d\n",sum);
}

Is This Answer Correct ?    14 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a pragma?

1131


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

1109


Is null equal to 0 in sql?

1151


What is identifier in c?

1015


How do you use a pointer to a function?

1088


What is the total generic pointer type?

1159


what are the different storage classes in c?

1184


What is calloc malloc realloc in c?

1059


Explain a file operation in C with an example.

1121


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3690


What is the stack in c?

1156


How can my program discover the complete pathname to the executable from which it was invoked?

1079


How can I get the current date or time of day in a c program?

1225


What is #line?

1059


Who is the founder of c language?

1172