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
regarding pointers concept
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
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 is meant by realloc()?
Explain how can I avoid the abort, retry, fail messages?
code for quick sort?
What is the use of parallelize in spark?
What is switch in c?
What does typedef struct mean?
What are bitwise shift operators in c programming?
Where can I get an ansi-compatible lint?
What is the difference between test design and test case design?
State the difference between realloc and free.
What does sizeof function do?
Is array name a pointer?