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 / karnik ankit

#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i,sum=0;
clrscr();
for(i=0;i<10;i++)
{
printf("\n enter an elements in array");
scanf("%d",&a[i]);
}
for(i=0;i<10;i++)
{
sum=sum+a[i];
}
printf("\n sum is %d",sum);
}

Is This Answer Correct ?    40 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two types of functions in c?

989


how to execute a program using if else condition and the output should enter number and the number is odd only...

2269


What is a protocol in c?

982


How many levels deep can include files be nested?

1130


Which built-in library function can be used to match a patter from the string?

1288


Is c pass by value or reference?

1027


Are there any problems with performing mathematical operations on different variable types?

1030


What is the newline escape sequence?

1062


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

1018


Why c is known as a mother language?

1075


What are types of structure?

1102


What is %d used for?

1024


write a c program for swapping two strings using pointer

2615


in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above

1004


How do we open a binary file in Read/Write mode in C?

1231