Answer Posted / d. prashant
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n)
{
rem=num%10;
sum=sum+rem;
num=num/10;
}
printf("sum = %d",sum);
}
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is spaghetti programming?
What is dynamic variable in c?
What is the purpose of void in c?
What is bin sh c?
What is an auto keyword in c?
What is indirection? How many levels of pointers can you have?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
application attempts to perform an operation?
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
What language is windows 1.0 written?
What is the best style for code layout in c?
What is the difference between union and anonymous union?
Explain #pragma statements.
can we implement multi-threads in c.
a value that does not change during program execution a) variabe b) argument c) parameter d) none