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 it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is string constants?
What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.
Explain the use of #pragma exit?
Why cant I open a file by its explicit path?
Explain the use of fflush() function?
How can I call fortran?
What is the use of c language in real life?
What is a good way to implement complex numbers in c?
Why C language is a procedural language?
What is the 'named constructor idiom'?
Explain the meaning of keyword 'extern' in a function declaration.
Explain indirection?
What language is lisp written in?