write a program in c to find out the sum of digits of a
number.but here is a condition that compiler sums the value
from left to right....not right to left..

Answer Posted / sorab aggarwal

#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,c,d,e;
a=10;
b=20;
c=30;
d=40;
e=(((a+b)+c)+d);
printf("the sum of no. is ::",e);
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how do you view the path?

661


What are the string functions? List some string functions available in c.

609


Explain modulus operator.

601


What is malloc and calloc?

578


what is uses of .net

1279






i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me

1484


What is the use of in c?

583


Why isnt any of this standardized in c?

641


What is the heap in c?

647


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

588


What does %d do in c?

550


How can I use a preprocessorif expression to ?

604


what are bit fields? What is the use of bit fields in a structure declaration?

1503


What is nested structure?

580


Why is it that not all header files are declared in every C program?

687