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
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
What's the total generic pointer type?
What is #include stdlib h?
What are pointers? What are different types of pointers?
How can a process change an environment variable in its caller?
Explain what is the difference between the expression '++a' and 'a++'?
What header files do I need in order to define the standard library functions I use?
What are valid operations on pointers?
main() { printf("hello"); fork(); }
What are conditional operators in C?
Is there a built-in function in C that can be used for sorting data?
Why is c called c?
How can I write a function analogous to scanf?
What is use of #include in c?
What does the c preprocessor do?