Answer Posted / guest
#include<stdio.h>
int main()
{
int n,sum=0;
printf("enter number");
scanf("%d".&n);
for(int i=0;i<5;i++)
{
sum=sum+(n%10);
n=n/10;
}
printf("sum is %d",sum);
return 0;
}
| Is This Answer Correct ? | 16 Yes | 2 No |
Post New Answer View All Answers
What are the 5 types of inheritance in c ++?
Why c is called free form language?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Lists the benefits of c programming language?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
If the size of int data type is two bytes, what is the range of signed int data type?
What is LINKED LIST? How can you access the last element in a linked list?
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 .
Does * p ++ increment p or what it points to?
What are the advantages and disadvantages of pointers?
What is volatile, register definition in C
What is const volatile variable in c?
What is a null pointer in c?