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 is the difference between if else and switchstatement
What is an endless loop?
Is c pass by value or reference?
what are the 10 different models of writing an addition program in C language?
Explain what are bus errors, memory faults, and core dumps?
Explain union. What are its advantages?
When should the volatile modifier be used?
How macro execution is faster than function ?
Does c have an equivalent to pascals with statement?
What is multidimensional arrays
What is a lvalue
Can 'this' pointer by used in the constructor?
What is pointers in c?
Tell me about low level programming languages.
What does it mean when a pointer is used in an if statement?