Answer Posted / anil kumar nahak
void main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n>0)
{
rem=num%10;
sum=sum+rem;
num=num/10;
}
printf("sum = %d",sum);
}
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
what is uses of .net
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is sizeof in c?
What is a buffer in c?
Why does notstrcat(string, "!");Work?
Explain what is wrong with this program statement? Void = 10;
Explain what is the purpose of "extern" keyword in a function declaration?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
Explain a file operation in C with an example.
How is null defined in c?
What is the full form of getch?
Can you write a programmer for FACTORIAL using recursion?
Tell me what is the purpose of 'register' keyword in c language?
What is the difference between void main and main in c?