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

Can true be a variable name in c?

1044


How do you list a file’s date and time?

1071


What is an identifier?

1036


what are the facialities provided by you after the selection of the student.

2265


How do you convert strings to numbers in C?

1230


What are the string functions? List some string functions available in c.

992


write an algorithm to display a square matrix.

2712


How many types of arrays are there in c?

1049


Write a program to check palindrome number in c programming?

1022


I just typed in this program, and it is acting strangely. Can you see anything wrong with it?

1014


How can a number be converted to a string?

1340


what is the different bitween abap and abap-hr?

2337


Once I have used freopen, how can I get the original stdout (or stdin) back?

1076


What is a pointer variable in c language?

1107


Explain what is the benefit of using const for declaring constants?

1039