write a program to find the sum of the array elements in c
language?
Answer Posted / raushan kumar
# include <stdio.h>
# include <conio.h>
void main()
{
int arr[value],sum=0;
int i;
clrscr();
printf("Enter data in array");
/*store data in array*/
for(i=1;i<value;i++)
{
scanf("%d",&arr[i]);
}
/*Print data in array*/
for(j=1;j<value;j++)
{
printf("%d",arr[i]);
sum=sum+arr[i];
}
/*Sum of array element*/
printf("\nArray Element Sum=%d",sum);
getch();
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What are the similarities between c and c++?
What is struct node in c?
Is flag a keyword in c?
Can we replace the struct function in tree syntax with a union?
Write a program of advanced Fibonacci series.
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
What is the role of && operator in a program code?
Explain how can I make sure that my program is the only one accessing a file?
Why does everyone say not to use scanf? What should I use instead?
why programs in c are running with out #include
What oops means?
How do you search data in a data file using random access method?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
What is 02d in c?
What is a structure and why it is used?