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



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

Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);

1 Answers  


Explain what is the difference between declaring a variable and defining a variable?

1 Answers  


write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?

4 Answers  


pgm to find middle element of linklist(in efficent manner)

4 Answers   Huawei,


What are the salient features of c languages?

0 Answers  


What is mean by data types in c?

0 Answers  


Can we write a program without main() function?

9 Answers  


Find the largest number from the given 2 numbers without using any loops and the conditional operator.

2 Answers  


What is pointer to pointer in c with example?

0 Answers  


What is bubble sort in c?

0 Answers  


Wt are the Buses in C Language

0 Answers   Infosys,


Read two numbers from keyboard and find maximum of them?

1 Answers  


Categories