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

What is c programing language?

1071


Write a program that accept anumber in words

1743


What does return 1 means in c?

1056


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

1121


Explain can static variables be declared in a header file?

1135


What are the Advantages of using macro

1154


What are structure members?

1073


which is an algorithm for sorting in a growing Lexicographic order

1788


Is c a great language, or what?

1093


Can the size of an array be declared at runtime?

1070


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2286


Is it possible to execute code even after the program exits the main() function?

1319


What is const volatile variable in c?

1023


What is ctrl c called?

1035


What is meant by recursion?

1034