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

//c program of sum array element
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum=0,n,a[100];
clrscr();
printf("How many number are you entering(less than 100) ?");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
//sum of array element
for(i=1;i<=n;i++)
{
sum=sum+a[i];
}
printf("Sum of your entered number is=%d",sum);
getch();
}//End of main

Is This Answer Correct ?    24 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null always equal to 0(zero)?

1024


Define and explain about ! Operator?

983


What is abstract data structure in c?

1020


What is C language ?

1949


Explain what happens if you free a pointer twice?

1063


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3298


Are enumerations really portable?

1011


Explain what is a stream?

1072


What are header files why are they important?

1078


What are the types of data types and explain?

1077


Write a program to print factorial of given number without using recursion?

978


Should I learn data structures in c or python?

1006


Why should I use standard library functions instead of writing my own?

1244


What is ## preprocessor operator in c?

1065


What is the Purpose of 'extern' keyword in a function declaration?

1064