Skip to content

Commit 375c07d

Browse files
authored
Update Array.md
1 parent 6438b28 commit 375c07d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Array.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@ Array may be defined abstractly as finite order set of homogeneous elements. So
99

1010
## Content
1111
* [Why do we need array?](#why-do-we-need-array)
12+
* [Advantages of array](#advantages-of-array)
1213
* [How to declare an array?](#how-to-declare-an-array)
14+
* [How to initialize an array](#how-to-initialize-an-array)
15+
* [Memory allocation of array](#memory-allocation-of-array)
16+
* [Properties of array](#properties-of-array)
17+
* [How to access elements of array](#how-to-access-elements-of-array)
18+
* [Basic operations on array](#basic-operations-on-array)
19+
- [Traversing](#traversing)
20+
- [Insertion](#insertion)
21+
- [Deletion](#deletion)
22+
- [Searching](#searching)
23+
- [Update](#update)
24+
* [Conclusion](#conclusion)
1325

1426
## Why do we need array?
1527
In computer programming, the most of the cases requires to store the large number of data of similar type. To store such amount of data, we need to define a large number of variables. It would be very difficult to remember names of all the variables while writing the programs. Instead of naming all the variables with a different name, it is better to define an array and store all the elements into it.
@@ -52,7 +64,7 @@ All the data elements of an array are stored at contiguous locations in the main
5264
* Elements of the array are stored at contiguous memory locations where the first element is stored at the smallest memory location.
5365
* Elements of the array can be randomly accessed since we can calculate the address of each element of the array with the given base address and the size of data element.
5466

55-
## How to access elements of Array
67+
## How to access elements of array
5668
You can access elements with the help of the index at which you stored them.
5769

5870
Suppose you declared an array a as above. The first element is a[0], the second element is a[1] and so on.
@@ -61,7 +73,7 @@ Suppose you declared an array a as above. The first element is a[0], the second
6173
printf(“%d\n”,a[0]);
6274
```
6375
64-
## Basic operation on array
76+
## Basic operations on array
6577
Following are the basic operations supported by an array.
6678
6779
### Traversing

0 commit comments

Comments
 (0)