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 / anuja kulkarni

#include<stdio.h>
#include<conio.h>

void main()
{
int a[5];
int i,sum=0;

clrscr();
printf("Enter the array elements\n");
for (i=0; i<5; i++)
scanf("%d",&a[i]);

// sum of array elements
for (i=0; i<5; i++)
{
sum=sum+a[i];
}
printf("Sum of array elements===%d",sum);
} // end of main()

Is This Answer Correct ?    295 Yes 71 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the explanation for prototype function in c?

921


What is the difference between volatile and const volatile?

935


What is an lvalue?

1013


Explain goto?

1091


Which programming language is best for getting job 2020?

982


Write a program to swap two numbers without using the third variable?

1015


What is a built-in function in C?

1512


Calculate 1*2*3*____*n using recursive function??

1981


What is a header file?

1026


Define C in your own Language.

1032


Write a program to check whether a number is prime or not using c?

1008


Explain how do you search data in a data file using random access method?

1069


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

1200


Difference between strcpy() and memcpy() function?

1071


Write a C program to count the number of email on text

1852