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 / sayeed khan

#include<stdio.h>
#include<conio.h>
int main()
{
int i,sum=0,a[30],n;

printf("Enter The Number=");

for(i=0;i<n;i++);

scanf("%d",&n);

sum=sum+a[i];

printf("the sum is %d\n",sum);

getch();
return 0;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1276


What is nested structure in c?

1074


What is ambagious result in C? explain with an example.

2639


If null and 0 are equivalent as null pointer constants, which should I use?

1230


Explain what are preprocessor directives?

1073


Explain what is the general form of a c program?

1099


Are enumerations really portable?

1034


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

2005


What are the string functions? List some string functions available in c.

996


Why c language?

1083


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15821


What is sizeof array in c?

1065


How do I determine whether a character is numeric, alphabetic, and so on?

1140


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

3695


Why does everyone say not to use scanf? What should I use instead?

1425