Arrays in C
📘 C
👁 28 views
📅 Dec 22, 2025
⏱ Estimated reading time: 2 min
An array is a collection of elements of the same data type stored in contiguous memory locations.
Advantages of Arrays
-
Stores multiple values using a single name
-
Easy access using index
-
Reduces code size
-
Efficient data handling
Types of Arrays
-
One-Dimensional Array
-
Two-Dimensional Array
-
Multidimensional Array
One-Dimensional Array
Declaration
Example
Initialization
Accessing Array Elements
Example Program (1D Array)
Two-Dimensional Array
Declaration
Example
Initialization
Example Program (2D Array)
Array Indexing
-
Array index starts from 0
-
Last index is
size - 1
Passing Arrays to Functions
Limitations of Arrays
-
Fixed size
-
Stores only similar data types
-
Insertion and deletion are difficult
Summary
-
Arrays store multiple values of same type
-
Index starts from 0
-
Supports one-dimensional and multidimensional arrays
-
Useful for handling large data sets
🔒 Some advanced sections are available for Registered Members
Register Now
Register Now
Share this Post
← Back to Tutorials