write a 'c' program to sum the number of integer values
Answer Posted / neha shree
void main()
{
int a,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 ? | 9 Yes | 12 No |
Post New Answer View All Answers
What is pre-emptive data structure and explain it with example?
How are strings stored in c?
What is the size of structure in c?
write a programming in c to find the sum of all elements in an array through function.
Differentiate between functions getch() and getche().
write a program to concatenation the string using switch case?
What is scope rule of function in c?
How can you tell whether a program was compiled using c versus c++?
How can I read data from data files with particular formats?
What are preprocessor directives in c?
What’s the special use of UNIONS?
What is the benefit of using #define to declare a constant?
What is self-referential structure in c programming?
How do you convert strings to numbers in C?
Do pointers take up memory?