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 is the difference between exit() and _exit() function?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
What are header files and explain what are its uses in c programming?
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
Write a program to check prime number in c programming?
What is linear search?
What are the characteristics of arrays in c?
How will you delete a node in DLL?
Explain the properties of union.
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
Is return a keyword in c?
What is d'n in c?
What is #line in c?
What is the newline escape sequence?
Can two or more operators such as and be combined in a single line of program code?