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 / madhura musale

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

Is This Answer Correct ?    25 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is return in c programming?

969


Explain how can I pad a string to a known length?

1189


What are structure types in C?

1096


What are the advantages of external class?

1060


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2051


Is javascript based on c?

1061


What are the restrictions of a modulus operator?

1119


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2021


Explain how can you check to see whether a symbol is defined?

1176


Can math operations be performed on a void pointer?

1043


What does the message "automatic aggregate intialization is an ansi feature" mean?

1184


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

1184


What is an identifier?

1032


What are the 5 organizational structures?

1025


c program for searching a student details among 10 student details

2091