Answer Posted / gg
try this....
#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 ? | 13 Yes | 16 No |
Post New Answer View All Answers
What are the different types of objects used in c?
What do you understand by normalization of pointers?
What is pivot in c?
What is nested structure with example?
What are the types of macro formats?
Where are some collections of useful code fragments and examples?
Difference between linking and loading?
What are static variables in c?
Explain how do you determine the length of a string value that was stored in a variable?
What does %p mean?
Why does not c have an exponentiation operator?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What are the storage classes in C?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
which type of aspect you want from the student.