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 / madhura musale

#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[10],sum;
clrscr();
printf("\n Enter the elements in an array :");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("\n The sum of elements of an array are :");
for((i=0;i<10;i++)
sum=sum+a[i];
printf("\t %d",sum);
getch();
}

Is This Answer Correct ?    25 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of functions in c?

990


What are disadvantages of C language.

1168


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

1054


Why pointers are used?

1081


please explain every phase in the "SDLC" in the dotnet.

2622


What is the significance of scope resolution operator?

1417


How can this be legal c?

1089


What is the condition that is applied with ?: Operator?

1134


What is the difference between constant pointer and constant variable?

1231


How can you convert integers to binary or hexadecimal?

1037


Why is not a pointer null after calling free?

1027


What are derived data types in c?

1091


how to construct a simulator keeping the logical boolean gates in c

2261


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3378


What is the difference between variable declaration and variable definition in c?

1060