Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Data Structures Arrays

Rating
-
Sold
-
Pages
12
Uploaded on
05-06-2022
Written in
2019/2020

All about Arrays in Data Structure. I will cover all your college tests and exams.

Institution
Course

Content preview

DATA STRUCTURE
ARRAY
ARRAY:
Array is a composite or non-primitive data type, that is, it is made up of simpler
data types.
– Array is a data structure that organizes a collection of data of the same
data type using consecutive memory cells.
– Array is a list of finite number ‘n’ of homogeneous data elements,
where:
 The elements of the array are stored in successive memory locations.
 The elements of the array are referenced by an index. Index values are
‘n’ consecutive numbers.
 Arrays exists in most programming languages and operations of this data
structure are already implemented by those programming languages.

,  Each array element occupies the same number of memory cells (bytes).
 Array data structure is used when the number of elements are fixed.
 Operations like traversal, searching and sorting can be easily performed on
Array.
 The number of elements in an array is called the Length or Size of the Array.
 The size of array is specified at creation or declaration of the array.
 Index consists of integers 0,1,2,3…, n.
 Index is mostly represented by a number in brackets after name of the array,
e-g.
– x [0], x [1], x [2], x [3], x [4], x [5]
 The name of the array is a pointer to first value. That is, name of an array stores
address of first memory.
 Arrays can be
– One dimensional array
 Array with one index. A [1]
– Two-dimensional array
 Array with two indexes. A [1][2]
– Or n-dimensional
One Dimensional Array:
The array in which there is only one dimension is called one dimensional array.
One dimensional array is also called a list or a linear array it consists of only one
row or one column e.g., Int x [5];
Length or size of the One-Dimensional Array:
Total number of elements in the ODA is called the length of the One-Dimensional
Array.

Written for

Course

Document information

Uploaded on
June 5, 2022
Number of pages
12
Written in
2019/2020
Type
Class notes
Professor(s)
Seema
Contains
Bs, bsc, ms, msc, first year, second year

Subjects

$4.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
Seema080

Also available in package deal

Get to know the seller

Seller avatar
Seema080 university
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 year
Number of followers
0
Documents
15
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions