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

What is break statement?

1110


What is spark map function?

1116


What is the purpose of void pointer?

1018


What is an lvalue in c?

1113


Explain what is the benefit of using #define to declare a constant?

1165


Give basis knowledge of web designing ...

2010


Is c a great language, or what?

1097


What is the difference between malloc() and calloc() function in c language?

1062


Where static variables are stored in memory in c?

982


Explain what are linked list?

1038


What is a protocol in c?

983


What does the characters “r” and “w” mean when writing programs that will make use of files?

1464


write a proram to reverse the string using switch case?

2921


How is a pointer variable declared?

1069


In a header file whether functions are declared or defined?

1117