Answer Posted / d. prashant
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n)
{
rem=num%10;
sum=sum+rem;
num=num/10;
}
printf("sum = %d",sum);
}
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What is the size of empty structure in c?
What are enumerated types?
How can I find out the size of a file, prior to reading it in?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Explain why C language is procedural?
What is indirection in c?
Tell us the use of fflush() function in c language?
What are two dimensional arrays alternatively called as?
What is openmp in c?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
using for loop sum 2 number of any 4 digit number in c language
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
What are the disadvantages of c language?