write a program to find the sum of the array elements in c
language?

Answer Posted / sayeed khan

#include<stdio.h>
#include<conio.h>
int main()
{
int i,sum=0,a[30],n;

printf("Enter The Number=");

for(i=0;i<n;i++);

scanf("%d",&n);

sum=sum+a[i];

printf("the sum is %d\n",sum);

getch();
return 0;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why header file is used in c?

577


Who is the founder of c language?

686


What is %d used for?

585


Can we add pointers together?

620


how to make a scientific calculater ?

1565






How can this be legal c?

651


Which is best book for data structures in c?

599


Write a program to identify if a given binary tree is balanced or not.

684


Explain what is a const pointer?

640


In C programming, how do you insert quote characters (‘ and “) into the output screen?

895


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

912


please give me some tips for the placement in the TCS.

1633


given post order,in order construct the corresponding binary tree

2323


Why does not c have an exponentiation operator?

629


What does != Mean in c?

590