Answer Posted / rakesh ranjan
#include<conio.h>
#include<stdio.h>
main()
{
int x=0,n,i;
printf("entre the number");
scanf("%d",&n);
for(;n>0;n/=10)
x=x+n%10;
printf("sum = %d",x);
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
In a byte, what is the maximum decimal number that you can accommodate?
Explain what are linked list?
What are the different types of data structures in c?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What is the -> in c?
What are the disadvantages of external storage class?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
What is a loop?
What are data types in c language?
Can 'this' pointer by used in the constructor?
Why is not a pointer null after calling free?
Explain about the constants which help in debugging?
What is equivalent to ++i+++j?
What is the advantage of a random access file?
What is wrong with this declaration?