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

i want to know the procedure of qualcomm for getting a job through offcampus

2420


What is struct node in c?

1027


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1122


How many parameters should a function have?

1139


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2085


What is difference between scanf and gets?

1183


Can you explain the four storage classes in C?

1080


What is pragma c?

1072


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

1073


Which driver is a pure java driver

1541


What do you mean by scope of a variable in c?

979


What are operators in c?

973


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

1843


Explain modulus operator. What are the restrictions of a modulus operator?

974


What does the error message "DGROUP exceeds 64K" mean?

1178