write a 'c' program to sum the number of integer values
Answer Posted / durga bhavani
void main()
{
int a[25],n,i,sum=0;
printf("enter n value");
scanf("%d",&n);
printf("\n Enter the numbers");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
sum+=a[i];
printf("\nSum of the given numbers is %d",sum);
}
| Is This Answer Correct ? | 39 Yes | 18 No |
Post New Answer View All Answers
How do you do dynamic memory allocation in C applications?
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 will you print TATA alone from TATA POWER using string copy and concate commands in C?
Explain about block scope in c?
List a few unconditional control statement in c.
What is the condition that is applied with ?: Operator?
How can you tell whether two strings are the same?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
How does #define work?
What is the purpose of main() function?
How can I sort a linked list?
What is extern c used for?
What is enumerated data type in c?
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
What is a pragma?