write a program to find the sum of the array elements in c
language?
Answer Posted / vijay
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i,sum=0;
clrscr();
for(i=0;i<10;i++)
{
printf("\n enter an elements in array");
scanf("%d",&a[i]);
}
for(i=0;i<10;i++)
{
sum=sum+a[i];
}
printf("\n sum is %d",sum);
}
Is This Answer Correct ? | 27 Yes | 17 No |
Post New Answer View All Answers
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What is assignment operator?
Explain is it valid to address one element beyond the end of an array?
What is string concatenation in c?
What are the advantage of c language?
What is pointer in c?
What is stack in c?
What does 2n 4c mean?
By using C language input a date into it and if it is right?
How can I insert or delete a line (or record) in the middle of a file?
Can you pass an entire structure to functions?
What is static and auto variables in c?
Can we initialize extern variable in c?
What is the advantage of a random access file?
What is %d used for?