write a program to find the sum of the array elements in c
language?
Answer Posted / karnik ankit
#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 ? | 40 Yes | 20 No |
Post New Answer View All Answers
Can true be a variable name in c?
How do you list a file’s date and time?
What is an identifier?
what are the facialities provided by you after the selection of the student.
How do you convert strings to numbers in C?
What are the string functions? List some string functions available in c.
write an algorithm to display a square matrix.
How many types of arrays are there in c?
Write a program to check palindrome number in c programming?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
How can a number be converted to a string?
what is the different bitween abap and abap-hr?
Once I have used freopen, how can I get the original stdout (or stdin) back?
What is a pointer variable in c language?
Explain what is the benefit of using const for declaring constants?