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

#include { printf("Hello"); } how compile time affects when we add additional header file .

1855


What is the difference between far and near ?

1156


What is actual argument?

1005


write a program to rearrange the array such way that all even elements should come first and next come odd

2225


How can I find out the size of a file, prior to reading it in?

1103


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

2398


Explain zero based addressing.

968


Once I have used freopen, how can I get the original stdout (or stdin) back?

1033


What are loops in c?

955


how to write optimum code to divide a 50 digit number with a 25 digit number??

3208


What is 2 d array in c?

963


What is difference between scanf and gets?

1171


What is dynamic memory allocation?

1286


What is the scope of an external variable in c?

985


Write a program to swap two numbers without using third variable?

1251