An array is a data structure used to store a collection of elements, typically of the same data type, in a contiguous block of memory. Arrays are widely used in programming to organize data efficiently and allow quick access to elements using an index.
🔑 Key Characteristics of Arrays:
Fixed Size: The size of an array is defined when it is created and cannot be changed afterward.
Indexed Access: Elements are accessed using an index, usually starting from 0.
Homogeneous Elements: Arrays hold elements of the same data type (e.g., all integers or all strings).
Contiguous Memory Allocation: Elements are stored in continuous memory locations, ensuring faster access.