write a program to find the sum of the array elements in c
language?
Answer Posted / vijay
#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 ? | 27 Yes | 17 No |
Post New Answer View All Answers
How do you define a string?
What is #include stdlib h?
Differentiate between static and dynamic modeling.
What is scope rule of function in c?
Does c have enums?
What is data structure in c and its types?
Write a program to swap two numbers without using third variable?
What are qualifiers?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What is volatile keyword in c?
Write a program to check palindrome number in c programming?
Tell me what is the purpose of 'register' keyword in c language?
write a c program for swapping two strings using pointer
What is #ifdef ? What is its application?
When should we use pointers in a c program?