Skip to content

Added one more Data Structure - Arrays #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 25, 2021
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions en/Data Structures/Arrays/array.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Arrays

Arrays are the most basic data structures used in programming. Arrays are data structures that contain a group of elements. Typically these elements are all of the same data type, such as `char` or `int`.\
All arrays consist of contiguous memory locations. We can access the elements with their index. The lowest address corresponds to the first element and the highest address to the last element.
<p align="center">
<img width="60%" src="https://www.tutorialspoint.com/cprogramming/images/arrays.jpg">
</p>

**Array Declaration**
`type arrayName [ arraySize ];`
`type` is the datatype of the array elements

**Array Initialization**
`int array1[] = {1,2,3};`

**Accessing Elements of Array**
`int variable1 = array[0];`

# Source

- [Introduction to arrays](https://www.geeksforgeeks.org/introduction-to-arrays/)

# YouTube

- [Video Tutorial](https://youtu.be/NptnmWvkbTw)
- [Video for understanding Arrays in C++](https://youtu.be/ibeGtDEQGz0)