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 / atul lakhera

#include<stdio.h>
#include<conio.h>
void main()
{
int num[10], sum=0;
for(int i=0; i<10; i++)
{
printf("Enter number=");
scanf("%d", &num[i]);
}
printf("Sum of elemets=");
for(i=0; i<10; i++)
{
sum=sum+num[i];
printf("%d", sum);
}
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the most efficient way to count the number of bits which are set in an integer?

1066


When is a null pointer used?

1121


Explain what is the difference between text files and binary files?

1160


What is a structure member in c?

1007


Explain why C language is procedural?

1227


c program to compute AREA under integral

2408


how many key words availabel in c a) 28 b) 31 c) 32

1082


What is call by value in c?

1008


What is the use of a ‘’ character?

1094


Explain a pre-processor and its advantages.

1139


What are the basic data types associated with c?

1273


How can I determine whether a machines byte order is big-endian or little-endian?

1067


What is %g in c?

1080


What is the difference between union and anonymous union?

1311


Is main is user defined function?

1155