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?

Answers were Sorted based on User's Feedback



write a program to find the sum of the array elements in c language?..

Answer / anuja kulkarni

#include<stdio.h>
#include<conio.h>

void main()
{
int a[5];
int i,sum=0;

clrscr();
printf("Enter the array elements\n");
for (i=0; i<5; i++)
scanf("%d",&a[i]);

// sum of array elements
for (i=0; i<5; i++)
{
sum=sum+a[i];
}
printf("Sum of array elements===%d",sum);
} // end of main()

Is This Answer Correct ?    295 Yes 71 No

write a program to find the sum of the array elements in c language?..

Answer / shruti

the above prog is perfect..

Is This Answer Correct ?    112 Yes 49 No

write a program to find the sum of the array elements in c language?..

Answer / vaibhav

#include<stdio.h>
#include<conio.h>
void main()
{
int n[5],sum=0,i=0;
clrscr();
for(i=0;i<4;i++)
{
scanf("%d",&n[i]);
}

for(i=0;i<4;i++)
{
sum=sum+n[i];
}
printf("sum are%d",sum);
getch();
}

Is This Answer Correct ?    72 Yes 41 No

write a program to find the sum of the array elements in c language?..

Answer / 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

write a program to find the sum of the array elements in c language?..

Answer / 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

write a program to find the sum of the array elements in c language?..

Answer / vijay

#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 ?    27 Yes 17 No

write a program to find the sum of the array elements in c language?..

Answer / syed shoaib

#include<stdio.h>
#include<conio.h>
void main()
{
int a[5];
int i,b=0;
printf("Enter the array elements\n");
for (i=0; i<5; i++)
scanf("%d",&a[i]);
for (i=0; i<5; i++)
{
b=b+a[i];
}
printf("Sum of array elements is %d",b);
}

Is This Answer Correct ?    19 Yes 13 No

write a program to find the sum of the array elements in c language?..

Answer / sumit aseri

/* programm of sum of array value*/
#include<stdio.h>
#include<conio.h>
void main()
{
int array[10],i,sum=0;
for(i=0;i<10;i++)
{
scanf("%d",&array[i];
printf("entered digits are=%d",array[i];
}
sum=sum+array[i]'
for(i=0;i<10;i++)
{
printf("the sum of digits=%d",sum);
}

getch();
}
/*join me on orkut search by name. i will solve your
problem*/

Is This Answer Correct ?    19 Yes 13 No

write a program to find the sum of the array elements in c language?..

Answer / aisha

#include<Stdio.h>
void main()
{
int sum=0,a[10],i,n;
printf("enter value of n");
scanf("%d",&n);
printf("enter array elements");
for(i=o;i<=n;;i++)
scanf("%d",&a[i]);
for(i=0;i<=n;i++)
{
sum= sum+a[i];
}
printf("sum of all array elements = %d",sum);
}

Is This Answer Correct ?    11 Yes 5 No

write a program to find the sum of the array elements in c language?..

Answer / m.sushma

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

Is This Answer Correct ?    19 Yes 15 No

Post New Answer

More C Interview Questions

How can I prevent other programmers from violating encapsulation by seeing the private parts of my class?

1 Answers  


write a c program to remove all the duplicate characters in a string and replace with single character? ex:-input- AAABBBCCC output- ABC

2 Answers   HCL,


Do you know what is a programing language ?

0 Answers  


list the no of files created when c source file is compiled

9 Answers   TCS,


sir, i cannot find the way how to write aprogram by using array on queue

1 Answers   IISIT,


Output for following program using for loop only * * * * * * * * * * * * * * *

3 Answers  


What is variable in c example?

0 Answers  


Is double link list a linear data structure? If Yes, Why?If No, Why?

4 Answers  


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


Write a program in c to input a 5 digit number and print it in words.

11 Answers  


How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST

6 Answers   Adobe, Huawei,


Is null always equal to 0(zero)?

0 Answers  


Categories