100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
1.5 Data Structures £5.49   Add to cart

Lecture notes

1.5 Data Structures

 43 views  0 purchase

Full notes for module 1.5 Data Structures

Preview 1 out of 3  pages

  • June 11, 2019
  • 3
  • 2016/2017
  • Lecture notes
  • Unknown
  • All classes
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
All documents for this subject (12)
avatar-seller
luca_pass
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller luca_pass. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £5.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

84866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£5.49
  • (0)
  Add to cart