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

#include<stdio.h>
void main()
{
int a[i],sum=0;
printf("enter n value");
scanf("%d",&n);
for(i=0;i<n,i++)
{
scanf("%d",&a[i])
}
for(i=0;i<n;i++)
{
sum=sum+a[i];
}
printf("sum=%d");
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are high level languages like C and FORTRAN also known as?

1239


When can you use a pointer with a function?

1155


Why can’t we compare structures?

1327


Why isn't it being handled properly?

1122


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1205


What is 'bus error'?

1210


Difference between linking and loading?

1158


Where can I get an ansi-compatible lint?

1208


What language is lisp written in?

1327


What is the use of linkage in c language?

1107


Is that possible to add pointers to each other?

1429


Differentiate between full, complete & perfect binary trees.

1174


What is the function of volatile in c language?

1187


What is the difference between printf and scanf in c?

1433


How can you avoid including a header more than once?

1025