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
What are the advantages of using macro in c language?
p*=(++q)++*--p when p=q=1 while(q<=6)
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Why do we use return in c?
How can I find the modification date and time of a file?
Can you write the algorithm for Queue?
What is pragma in c?
What is the translation phases used in c language?
Is linux written in c?
What is the use of volatile?
What are the complete rules for header file searching?
Define the scope of static variables.
What is a method in c?
Explain pointer. What are function pointers in C?
What is a keyword?