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
List a few unconditional control statement in c.
What is the full form of getch?
Explain the term printf() and scanf() used in c language?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
What are high level languages like C and FORTRAN also known as?
How can you check to see whether a symbol is defined?
Do you know the difference between malloc() and calloc() function?
p*=(++q)++*--p when p=q=1 while(q<=6)
What is 02d in c?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
What is calloc in c?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
What is the deal on sprintf_s return value?
What are the application of c?
Differentiate fundamental data types and derived data types in C.