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

what is array?

Answer Posted / geetha gajendiran

a simple program using array

#include<stdio.h>
void main()
{
int avg,sum=0;
int i;
int pay[30];/*array declaration*/
for(i=0;i<=29;i++)
{
printf("\n enter payment:");
scanf("%d",&pay[i]);/*store data in array*/
}
for(i=0;i<=29;i++)
sum=sum+pay[i];/*read data from an array*/
avg=sum/30;
printf("\n average marks =%d",avg);
}

Is This Answer Correct ?    20 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a global variable in c?

1001


What is the purpose of sprintf?

1128


Differentiate between ordinary variable and pointer in c.

1171


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

1228


What is the difference between text and binary modes?

1182


Who developed c language?

1080


What is a null pointer in c?

1216


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1287


Stimulate calculator using Switch-case-default statement for two numbers

2981


Why do we need arrays in c?

1149


WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?

2371


What is the difference between char array and char pointer?

1042


Difference between Shallow copy and Deep copy?

2016


What are reserved words?

1104


How many keywords (reserve words) are in c?

1134