Top 16: Data Types and Structures Flashcards

1
Q

A variable is a

A

data item required to be input by user when a program is run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When declaring, a variable creates a

A

storage area in memory where variable will be held while the program is run

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To declare a variable we must

A

identify all the variable which will be used by the program and their data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

There are 5 data types and they are;

A

string, integer, real, boolean, 1D arrays

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

String is used to hold

A

text, for examples names and addresses. (alphanumeric data)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Integer is used to hold

A

a number with no decimal parts, e.g. 4, -2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Real is used to hold

A

number with fractional parts, e.g. 3.7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A boolean is

A

a data type that hold only one of two values. e.g. yes or no, true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A 1D array is a sepcial category of variable because

A

it can hold multiple pieces of similar data whereas normal data can only hold one. E.g. a highscore on a game

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A fixed loop will

A

go through the code a set number of times.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly