write a program to find the sum of the array elements in c
language?
Answer Posted / madhura musale
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[10],sum;
clrscr();
printf("\n Enter the elements in an array :");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("\n The sum of elements of an array are :");
for((i=0;i<10;i++)
sum=sum+a[i];
printf("\t %d",sum);
getch();
}
| Is This Answer Correct ? | 25 Yes | 26 No |
Post New Answer View All Answers
What are the types of functions in c?
What are disadvantages of C language.
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
Why pointers are used?
please explain every phase in the "SDLC" in the dotnet.
What is the significance of scope resolution operator?
How can this be legal c?
What is the condition that is applied with ?: Operator?
What is the difference between constant pointer and constant variable?
How can you convert integers to binary or hexadecimal?
Why is not a pointer null after calling free?
What are derived data types in c?
how to construct a simulator keeping the logical boolean gates in c
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What is the difference between variable declaration and variable definition in c?