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
What are high level languages like C and FORTRAN also known as?
When can you use a pointer with a function?
Why can’t we compare structures?
Why isn't it being handled properly?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What is 'bus error'?
Difference between linking and loading?
Where can I get an ansi-compatible lint?
What language is lisp written in?
What is the use of linkage in c language?
Is that possible to add pointers to each other?
Differentiate between full, complete & perfect binary trees.
What is the function of volatile in c language?
What is the difference between printf and scanf in c?
How can you avoid including a header more than once?