Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / karnik ankit

#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 ?    40 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static and global variable in c?

979


Is it possible to execute code even after the program exits the main() function?

1280


Can I initialize unions?

985


Add Two Numbers Without Using the Addition Operator

767


write a program for the normal snake games find in most of the mobiles.

2212


How do you search data in a data file using random access method?

1252


Differentiate between null and void pointers.

1116


What is "Duff's Device"?

1111


What is spark map function?

1056


What is a keyword?

1120


What is a global variable in c?

952


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1256


What does int main () mean?

955


What is typedef example?

1111


How can I make sure that my program is the only one accessing a file?

1189