write a program to find the sum of the array elements in c
language?
Answer Posted / rajkumar
//c program of sum array element
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum=0,n,a[100];
clrscr();
printf("How many number are you entering(less than 100) ?");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
//sum of array element
for(i=1;i<=n;i++)
{
sum=sum+a[i];
}
printf("Sum of your entered number is=%d",sum);
getch();
}//End of main
| Is This Answer Correct ? | 24 Yes | 9 No |
Post New Answer View All Answers
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
How do you override a defined macro?
What are the types of assignment statements?
Describe dynamic data structure in c programming language?
List some of the static data structures in C?
What's the right way to use errno?
What is a built-in function in C?
Explain what is meant by high-order and low-order bytes?
What is the use of typedef in structure in c?
What is 02d in c?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
What are different types of operators?
What is the difference between formatted&unformatted i/o functions?
what is bit rate & baud rate? plz give wave forms
what is the difference between 123 and 0123 in c?