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 / 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 |
What is the difference between the local variable and global variable in c?
12345 1234 123 12 1
WHAT IS HEADER?
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack
write a program to print infinte number
what would be the output of the following prog? Justify your answer? main() { unsigned char ch; unsigned char i; ch = -255; printf("%d",ch); i = -1; printf("%d",i); }
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
What is indirection?
What are the disadvantages of c language?
What are the loops in c?
How can I prevent another program from modifying part of a file that I am modifying?
main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?