write a program to find the sum of the array elements in c
language?
Answer Posted / uday
#include<stdio.h>
void main()
{
int a[i],sum=0;
printf("enter n value");
scanf("%d",&n);
for(i=0;i<n,i++)
{
scanf("%d",&a[i])
}
for(i=0;i<n;i++)
{
sum=sum+a[i];
}
printf("sum=%d");
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Where is c used?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Is this program statement valid? INT = 10.50;
What is function pointer c?
What are the different types of data structures in c?
What is call by reference in functions?
How does placing some code lines between the comment symbol help in debugging the code?
How do you sort filenames in a directory?
how to create duplicate link list using C???
What is volatile keyword in c?
Without Computer networks, Computers will be half the use. Comment.
Do you know the difference between malloc() and calloc() function?
I have a varargs function which accepts a float parameter?
Why dont c comments nest?