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
What is a null string in c?
What is define c?
What are the advantages of using Unions?
Explain the difference between malloc() and calloc() in c?
Once I have used freopen, how can I get the original stdout (or stdin) back?
Write a program of advanced Fibonacci series.
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is difference between union and structure in c?
What is meant by inheritance?
What is the translation phases used in c language?
Does free set pointer to null?
With the help of using classes, write a program to add two numbers.
What are local static variables? How can you use them?
Explain how can you determine the size of an allocated portion of memory?
What is difference between arrays and pointers?