Documente Academic
Documente Profesional
Documente Cultură
Topic 7: Arrays
Objectives
In this chapter, you will learn about
Introduction to Array
Array declaration
Array initialization
Assigning values to array elements
Reading values from array elements
Relationship with pointers
Passing array to function
2 Dimensional arrays
Simple Searching
Simple Sorting
int main(void)
{
int apartment[5] = {3,2,6,4,5};
int index, total = 0;
void main(void)
{
float marks[size] = {0.0};
get_marks(marks);
printf("Average for marks given is %f\n", calc_average(marks));
}