13: Data Types and Structures

Description

A Level AS Computer Science (Unit 2: Fundamental Problem-solving and Programming Skills) Flashcards on 13: Data Types and Structures, created by HRYN red on 11/05/2017.
HRYN red
Flashcards by HRYN red, updated more than 1 year ago
HRYN red
Created by HRYN red almost 7 years ago
8
0

Resource summary

Question Answer
What are primitive data types? variables that cna be defined simply by commands built into the programming language (atomic data types)
Give 4 exampeles of privitve data types and 2 furhter daya types Integer Real boolean char further: string, data
What is a integer, real, char, string, boolean, data? signed whole number signed number with decimal point single character sequence on 0 or more characters logical values true and false dat, moneth, year sometimes time
Describe the record type composite type: logical group of different data types - user-defined type
How write record type in pseudecode? TYPE ___ DECLARE ___: ____ ENDTYPE
Array Index Row or colomn number of an individual array element.
Upper Bound The highest number index of an array dimension.
Lower Bound The smallest number index of an array dimension.
What is an array? ordered set of data itmes, usually of same type, grouped together with single identifier
Linear Search Checking each element of an array in turn for a requred value.
Bubble Sort A sort method where adjacent pairs of values are compared and swapped. (sorting in 1d array compare 1st and 2nd if 2nd bigger swap, repeat, repeat)
Declare a 1d array in pseudecode DECLARE ___ : ARRAY[ : ] of __
Declare a 2d array in pseudecode DECLARE ___: ARRAY[ : , : ] of (datatype) # rows given first then clomus, lower and upper bounds
Textfiles: writing to a text file in pseudecode read append OPENFILE ___ FOR WRITE WRITEFILE ____, ______ CLOSEFILE ____ OPENFILE ___ FOR READ READFILE ____, ______ CLOSEFILE ____ OPENFILE ___ FOR APPEND WRITEFILE ____, ______ CLOSEFILE ____
redad a text file and ouput contents in pseudecode OPENFILE "_.txt" FOR READ WHILE NOT EOF("_.txt") DO READFILE "_.txt", TextString OUPUT TextString ENDWHILE CLOSEFILE "_.txt"
Abstract Data Type ADTs A collection of data with associated operations
What are the associated perations of ADTs 5 - create a new instance of the data structure - find an element int eh data strucutre - insert a new element into the data strucutre -detele an element from data strucutre -access all elements stored in teh data structure in a systematic manner
Give 3 examples of ADTs stack queue linked list
Describe stacks item accessible at top of stack. Bse of stack Pointer - first slot in stack TopofStack Pointer - last item pushed onto stack DECLARE Stack: Array[0:7] of CHAR
Describe queues front position - . circular quese- wrap around
Node An element of a list.
Pointer A varaible that stores the address of the node it points to.
Null Pointer A pointer that doesn't point to anything.
Start Pointer A varaible that stores the address of the first element of a linked list.
Describe linked lists: to detlet adv over linear lists, dis to delete - set before pointer field to null pointer. Add start pointer copied into new point. Prefereable to linerar lists - when need reordering only points need changing unlike linear - all data itmes need to be moved - saves time Dis - needs more storage space for pointer fields
Show full summary Hide full summary

Similar

Types of Numbers
Jay Patel
CHEMISTRY C1 5
x_clairey_x
Master French
jedimaster3721
GCSE Science - B1 - You and Your Genes - Genes, Chromosomes and DNA
GeorgeHaines
Project Scope Management Process
neeshar
Why did the Cold War end?
E A
Chemistry revision
Jordyn Niu
AS English language terminology revision
Caitlin Hadfield
Část 6.
Gábi Krsková
Celiac Disease
wedad attar
Data Protection Act 1998
Carina Storm