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..



write a program in c to find out the sum of digits of a number.but here is a condition that compile..

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

Post New Answer

More C Interview Questions

Is flag a keyword in c?

0 Answers  


can v write main() { main(); } Is it true?

6 Answers  


What are directives in c?

0 Answers  


Can you apply link and association interchangeably?

0 Answers   InterGraph,


/*program to calculate hra,da in salary if salary less than 10000 then hra15%,da13% otherwise hra20%,da18%/*

6 Answers  






Is c is a procedural language?

0 Answers  


what is Array?

3 Answers  


What is the use of getch ()?

0 Answers  


Explain the red-black trees?

0 Answers  


How do shell structures work?

0 Answers  


Explain what are its uses in c programming?

0 Answers  


control 50 devices which has 2 states on and off.using bitwise operator.plz answer it its urgent

1 Answers  


Categories