Answer Posted / jay soni
#include<stdio.h>
#include<conio.h>
void main()
{
int n,sum=0,r;
printf("enter the value");
scanf("%d",&n);
while(n>0)
{
r=n%10;
n=n/10;
sum=sum+r;
}
printf("\nsum of digits is %d",sum);
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define C in your own Language.
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is a macro?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Why is c faster?
What is the need of structure in c?
What is wild pointer in c with example?
How do you write a program which produces its own source code as output?
Explain the ternary tree?
What is integer constants?
In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
Is that possible to store 32768 in an int data type variable?
In C, What is the #line used for?
develop algorithms to add polynomials (i) in one variable