What is an Array?

Data Structure >   Array >   Array Introduction in Data Structure  

Short Question

830


Answer:

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.

Declaring an array

Type variable_name [length of array];

For example:-

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.


This Particular section is dedicated to Question & Answer only. If you want learn more about Data Structure. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.