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

What is clrscr in c?

1171


Why is it that not all header files are declared in every C program?

1283


What is meant by type specifiers?

1188


Compare interpreters and compilers.

1115


What is the basic structure of c?

1154


Explain the difference between ++u and u++?

1187


Why do we need volatile in c?

1230


what is the format specifier for printing a pointer value?

1074


Explain the difference between strcpy() and memcpy() function?

1065


any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

1171


What is the difference between #include and #include 'file' ?

1121


What is variable initialization and why is it important?

1341


What is call by value in c?

1053


What are variables c?

1094


Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol

1170