Answer Posted / anil kumar nahak
void main()
{
int n,i,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n>0)
{
rem=num%10;
sum=sum+rem;
num=num/10;
}
printf("sum = %d",sum);
}
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Explain that why C is procedural?
List out few of the applications that make use of Multilinked Structures?
Give the rules for variable declaration?
Explain why can’t constant values be used to define an array’s initial size?
Why is c fast?
What is an operator?
When should you not use a type cast?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Why is c so popular?
How pointers are declared?
What is header file definition?
Explain what are the advantages and disadvantages of a heap?
What is the best style for code layout in c?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles