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

Explain what is the concatenation operator?

0 Answers  


how many key words availabel in c a) 28 b) 31 c) 32

0 Answers  


wat are the two methods for swapping two numbers without using temp variable??

2 Answers  


Is c still relevant?

0 Answers  


what is the difference between declaration and definition of a variable or function ?

3 Answers  






What is the code for 3 questions and answer check in VisualBasic.Net?

0 Answers   Infosys,


can i know the source code for reversing a linked list with out using a temporary variable?

6 Answers   Honeywell,


What is the use of void pointer and null pointer in c language?

0 Answers  


A C E G H +B D F A I ------------ E F G H D

1 Answers   Infosys,


What are local static variables?

0 Answers  


what is difference between null and nul in c language

2 Answers  


Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)

1 Answers  


Categories