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 / syed shoaib

#include<stdio.h>
#include<conio.h>
void main()
{
int a[5];
int i,b=0;
printf("Enter the array elements\n");
for (i=0; i<5; i++)
scanf("%d",&a[i]);
for (i=0; i<5; i++)
{
b=b+a[i];
}
printf("Sum of array elements is %d",b);
}

Is This Answer Correct ?    19 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe static function with its usage?

1151


Do character constants represent numerical values?

1285


What is the use of static variable in c?

1043


What is pointer to pointer in c with example?

981


How can you tell whether two strings are the same?

1202


How do you define CONSTANT in C?

1209


What is the difference between %d and %i?

1042


What are qualifiers in c?

979


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3016


Explain what is the benefit of using an enum rather than a #define constant?

1168


Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.

3635


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

978


How can you draw circles in C?

1098


Why do we need volatile in c?

1117


What is c value paradox explain?

1016