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

How many levels of pointers can you have?

1251


What is a class c rental property?

1146


What are structure members?

1144


When should the volatile modifier be used?

1237


Explain how do you determine the length of a string value that was stored in a variable?

1202


What should malloc(0) do?

1188


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1265


Write a program to swap two numbers without using third variable?

1351


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

2356


Is exit(status) truly equivalent to returning the same status from main?

1121


What is the difference between ā€˜g’ and ā€œgā€ in C?

4094


What is meant by recursion?

1100


What are data types in c language?

1109


what is a NULL Pointer? Whether it is same as an uninitialized pointer?

1331


Define the scope of static variables.

1199