Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can I write functions that take a variable number of arguments?

1094


Do you know the use of 'auto' keyword?

1145


What is difference between array and pointer in c?

1048


What is difference between union All statement and Union?

1075


What is the right way to use errno?

1015


What is c definition?

1211


Explain which function in c can be used to append a string to another string?

1057


Give me the code of in-order recursive and non-recursive.

1335


Is c is a procedural language?

1054


What is a class c rental property?

1062


What do the functions atoi(), itoa() and gcvt() do?

1152


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1317


What are the basic data types associated with c?

1242


What is define directive?

1099


Hi can anyone tell what is a start up code?

2029