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
What is break statement?
What is spark map function?
What is the purpose of void pointer?
What is an lvalue in c?
Explain what is the benefit of using #define to declare a constant?
Give basis knowledge of web designing ...
Is c a great language, or what?
What is the difference between malloc() and calloc() function in c language?
Where static variables are stored in memory in c?
Explain what are linked list?
What is a protocol in c?
What does the characters “r” and “w” mean when writing programs that will make use of files?
write a proram to reverse the string using switch case?
How is a pointer variable declared?
In a header file whether functions are declared or defined?