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
How can you determine the size of an allocated portion of memory?
What does typeof return in c?
What is the usage of the pointer in c?
Who is the main contributor in designing the c language after dennis ritchie?
Write a program to swap two numbers without using third variable?
Explain what is the difference between null and nul?
Explain what math functions are available for integers? For floating point?
Array is an lvalue or not?
What is c method?
write a program in c language to print your bio-data on the screen by using functions.
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
a value that does not change during program execution a) variabe b) argument c) parameter d) none
What are logical errors and how does it differ from syntax errors?
How do I use void main?
How do we declare variables in c?