Data Types Flashcards Preview

Paper 1 - Computer Science > Data Types > Flashcards

Flashcards in Data Types Deck (32)
Loading flashcards...
1

What are data types used to describe?

They describe the type of data a variable contains in a computer program

2

What is an Integer data type?

A positive or negative whole number

3

What is a Real/Float data type?

A number that contains a decimal point

4

What is a Boolean data type?

Can represent two logical states "True" or "False"

5

What is a Character data type?

Represents a single alphanumeric data item

6

What is a String data type?

one or more characters

7

What is a Date/time data type?

Contains details of an instant in time

8

What is a Pointer/reference data type?

A data object that contains the memory location of another variable. A form of indirect addressing

9

What is a records data type?

Made up of a list of elements which can contain a group of fixed length fields of different data types

10

What is an arrays data type?

Made up of a list of data elements that are the same data type and size. Can be one or more dimensional

11

What is a built in data type?
Give some examples

A data type that the programming language offers built in support.
Integer, Byte, Boolean, Real, Character, Strings

12

What are user defined data types?

A data type declared by the user to meet their specific requirements

13

What are variables?

Variables are used to store data that may change when the program is executed

14

What are Constants and how are they represented?

Constants are used to store data that does not change. They are declared in all capital letters.

15

What is assignment?

Assignment is where a value is computed within a program and assigned to a variable

16

What is a subroutine?

A set of instructions that perform a certain task. It can be stored once and called many times within a program

17

What is a procedure?

A subroutine that is called to perform a task. It doesn't return a value

18

What is a function?

A subroutine that contains a series of instructions. When called it executes the instructions and returns a value

19

What is iteration?

Where a program repeatedly executes a section of code whilst a logical condition is satisfied.

20

What is definite iteration?

Where the number of iterations that take place is known before the start of execution.

21

What is indefinite iteration?

Where the number of iterations that take place are unknown before the start of the loop but is determined by a logical condition.

22

When is a for loop used?

Used in definite iteration, when the same instruction/calculations are carried out for a known number of iterations

23

When is a while used?

Used in definite iteration, when a condition is satisfied at the start of a loop and stops when it's no longer true.

24

When is a repeat until loop used?

Used in indefinite iteration, it repeats until the condition is no longer true

25

What are identifiers?

Identifiers are symbolic names used for any variable, function or data definition.

26

What is selection?

Selection is where different lines of code are carried out depending on the result of a comparison.

27

When are IF-THEN statements used?

Used to execute one block of code when a boolean condition is true. No other branching when the condition is false.

28

When are IF-THEN-ELSE statements used?

Executes one block of code when a boolean condition is true and an alternative block of code when the condition is false.

29

When are nested IF-THEN-ELSE statements used?

Used if there is more than one expression to be tested. Selection inside selection.

30

When are CASE statements used?

Used to create several IF-THEN-ELSE statements in a row.

i.e. if, elif, elif, else