Professional Documents
Culture Documents
Name-Manikant Pandey
Roll No.-
Dept.- Information technology
Sec- B
Semester- 3rd
Sub- Data Structures and Algorithms
(PCC CS301)
Array
It is a linear Data Structure which is a collection of data of the same Data type
stored at contiguous memory locations.
For Example- Array of Integer(typed as “int” in c syntax) Data Type can only store
integers.
This makes it easier to calculate the position of each element by simply adding an
offset to a base value, i.e., the memory location of the first element of the array
(generally denoted by the name of the array).
History
The first digital computers used machine-language programming to set up and
access array structures for data tables, vector and matrix computations, and for
many other purposes.
Central Features of Data Structures-
Motivation
Now the very next thing which comes into our mind is Why do we have
to learn Array Data Structure ?
So, here we will give some practical uses to motivate students to learn
and use Arrays.
(1) It is used to store the data of same type.So, we can store our contact
details(i.e., our mobile phone numbers) using arrays.
Array Representation-
Here in the given pictorial representation we are trying to show how the
indexing is done.
Suppose for example the size of an array is ‘n’.
Then the indexing will be from ‘n’ to ‘n-1’.
Code to represent Declaration and Initialization of Array at the same
time-
METHODOLOGY
Conclusion
Array is one data structure that has been used (as well as abused)
more than any other. Arrays are simple yet reliable and are used in
more situations than you can count.
Yet they have problems that are typical to them,which at times lead
to serious performance issues. They are like old friends. You
accept and live with their qualities -good as well as bad.
References
Websites- Google
GeeksforGeeks
Tutorialspoint