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 / vijay

#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 ?    27 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1967


Explain which function in c can be used to append a string to another string?

1139


What are the different types of C instructions?

1376


Explain what is a 'locale'?

1131


What is cohesion and coupling in c?

1098


Why is it usually a bad idea to use gets()? Suggest a workaround.

1873


Why header file is used in c?

1162


What is the use of function overloading in C?

1218


What are the uses of null pointers?

1199


Explain how can a program be made to print the name of a source file where an error occurs?

1251


Why does everyone say not to use gets?

1201


What are the functions to open and close file in c language?

1263


What is array in C

1211


Explain what math functions are available for integers? For floating point?

1162


Why use int main instead of void main?

1181