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 / sayeed khan

#include<stdio.h>
#include<conio.h>
int main()
{
int i,sum=0,a[30],n;

printf("Enter The Number=");

for(i=0;i<n;i++);

scanf("%d",&n);

sum=sum+a[i];

printf("the sum is %d\n",sum);

getch();
return 0;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you delete a node in DLL?

1277


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

1344


How can I list all of the predefined identifiers?

972


What is the purpose of scanf() and printf() functions?

1228


Where static variables are stored in memory in c?

982


Compare interpreters and compilers.

1052


Why doesnt this code work?

1049


How can I read and write comma-delimited text?

1063


How to get string length of given string in c?

1052


Can a pointer be volatile in c?

970


Explain how can I avoid the abort, retry, fail messages?

1034


Explain 'far' and 'near' pointers in c.

1127


Is c object oriented?

958


How can I generate floating-point random numbers?

1118


provide an example of the Group by clause, when would you use this clause

2179