100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Lecture notes

1.5 Data Structures

Rating
-
Sold
-
Pages
3
Uploaded on
11-06-2019
Written in
2016/2017

Full notes for module 1.5 Data Structures









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
June 11, 2019
Number of pages
3
Written in
2016/2017
Type
Lecture notes
Professor(s)
Unknown
Contains
All classes

Content preview

AS Computing
Unit 1.5 Data Structures
What is a data structure?
A data structure is a collection of data items stored in memory, in addition a number of operations
are provided by the software to manipulate that data structure.
So, why do we use them?

Take the code block shown here:

The problem with this piece of code is
that the program will only store the last
name and mark entered. This is
because each name and mark is stored
in the same variable and every time a
new piece of data is entered the old
one is overwritten.
To perform this task properly we would
use a one-dimensional array.


So, instead of setting up 5 separate variables we can create one array to hold all of the data entered.
So you would have an index with 5 elements and each array element would refer to the respective
piece of data. Array element numbers start at 0, so, the first piece of data in the array could be
retrieved by: array (0).

One Dimensional Arrays

The arrays so far have been called one dimensional because they can be represented as linked cells
stretched out in a one dimensional line in the following ways:




Array(0) Array(1) Array(2) Array(3) Array(4)



Or like this:



Index 0 1 2 3 4
Stored Value




Page |1 Luca Passariello AS Computing
£5.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
luca_pass

Also available in package deal

Thumbnail
Package deal
WJEC AS Computer Science Unit 1
-
2 12 2019
£ 65.88 More info

Get to know the seller

Seller avatar
luca_pass Cardiff University
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
6 year
Number of followers
2
Documents
24
Last sold
2 year ago

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 exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions