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
In C language what is a 'dangling pointer'?
Who developed c language and when?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
What are the application of c?
What is logical error?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
How do you search data in a data file using random access method?
What is calloc malloc realloc in c?
How can you find out how much memory is available?
write a program to concatenation the string using switch case?
What is string function c?
What is a shell structure examples?
What is the importance of c in your views?
Why does everyone say not to use gets?
what is different between auto and local static? why should we use local static?