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
Is c# a good language?
What is an auto keyword in c?
Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings
ATM machine and railway reservation class/object diagram
Explain how do you determine a file’s attributes?
Write a c program to demonstrate character and string constants?
what are bit fields? What is the use of bit fields in a structure declaration?
Why we write conio h in c?
What is assignment operator?
What is the size of enum in c?
When c language was developed?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What is the function of this pointer?
Why isnt there a numbered, multi-level break statement to break out