Answer Posted / pooja
main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n!=0)
{
r=n%10;
n=n/10;
sum=sum+r;
}
printf("\nsum of digits is %d",sum);
}
| Is This Answer Correct ? | 57 Yes | 11 No |
Post New Answer View All Answers
What are identifiers c?
all c language question
Why do we need volatile in c?
What is function prototype in c with example?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
When is a “switch” statement preferable over an “if” statement?
How many bytes is a struct in c?
What is meant by type specifiers?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
Under what circumstances does a name clash occur?
What is a null pointer in c?
Explain argument and its types.
Explain high-order bytes.
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
Differentiate call by value and call by reference?