Explanatory Question
What is an Array?
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.
An Array can be defined as a data structure having fixed size sequenced collection of elements of same data type and which can be referenced through the same variable name. An Array is a name given to a group of similar quantities.
Type variable_name [length of array];
double height[10];
float width[20];
int min[9];
int myArray[5] = {1, 2, 3, 4, 5}; //declare and initialize the array in one statement
In C language array starts at position 0. C language treats array name as the pointer to the first element and an item in the array can be accessed through its index.
First read the answer fully, then try to explain it in your own words. After that, open a few related questions and compare the concepts. This method helps you remember the topic for a longer time and improves exam preparation.