Answer Posted / bhagwat
main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n!=0)
{
r=n%10;
n=n/10;
sum=sum+r;
}
Is This Answer Correct ? | 53 Yes | 19 No |
Post New Answer View All Answers
Does c have function or method?
What is the main difference between calloc () and malloc ()?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
Explain how can I right-justify a string?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What does node * mean?
Are there any problems with performing mathematical operations on different variable types?
Can you write the function prototype, definition and mention the other requirements.
What is the difference between void main and main in c?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
Is c easier than java?
What is a lookup table in c?
Stimulate calculator using Switch-case-default statement for two numbers
In C language, a variable name cannot contain?
Was 2000 a leap year?