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 a null string in c?

1033


What is define c?

1068


What are the advantages of using Unions?

1115


Explain the difference between malloc() and calloc() in c?

1042


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

1073


Write a program of advanced Fibonacci series.

1145


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2067


What is difference between union and structure in c?

1157


What is meant by inheritance?

1086


What is the translation phases used in c language?

1119


Does free set pointer to null?

1001


With the help of using classes, write a program to add two numbers.

1031


What are local static variables? How can you use them?

1145


Explain how can you determine the size of an allocated portion of memory?

1106


What is difference between arrays and pointers?

1063