write a program to find the sum of the array elements in c
language?
Answer Posted / bishmeet singh
#include<stdio.h>
#include<conio.h>
void main()
{
int a[5],i,sum=0;
clrscr();
printf("enter the 5 elements to sum");
for(i=0;i<5;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<5;i++)
{
sum=sum+a[i];
}
printf("sum of the elements is %d",sum);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is structure packing in c?
What is meant by realloc()?
What is the difference between new and malloc functions?
What is a spanning Tree?
What is file in c language?
In C language, a variable name cannot contain?
What is the best way to store flag values in a program?
what are # pragma staments?
When should you not use a type cast?
What does emoji p mean?
What does the c in ctime mean?
What is the use of sizeof () in c?
What is substring in c?
What is a void pointer? When is a void pointer used?
I need testPalindrome and removeSpace
#include