- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Includes
Certificate & Practice Material
Programs for practice
In the program below, we've introduced beginers to programming in C
Source Code: Program to find sum of elements of an array
# Program to find sum of elements of an array in C
#include<stdio.h>
void main()
{
int i,s,sum;
int A[10];
printf("Enter values of array1:\n");
for(i=0;i<10;i++)
scanf("%d",&A[i]);
sum=0;
for(i=0;i<10;i++)
sum=sum+A[i];
printf("Sum of all the elements of the given array is:");
printf("%d\n",sum);
}
Output
Run the program to see the OUTPUT