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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1717


What is bash c?

1008


What is the use of getch ()?

1076


Difference between macros and inline functions? Can a function be forced as inline?

1267


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

1152


Explain why can’t constant values be used to define an array’s initial size?

1350


Write a program to print fibonacci series using recursion?

1060


Differentiate between #include<...> and #include '...'

1050


What are operators in c?

1022


What are the Advantages of using macro

1166


How do you use a 'Local Block'?

1166


Write a program to reverse a linked list in c.

1121


How can you draw circles in C?

1156


What is function prototype in c language?

1031


What is chain pointer in c?

1058