Data Types Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What are data types used to describe?

A

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

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

What is an Integer data type?

A

A positive or negative whole number

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

What is a Real/Float data type?

A

A number that contains a decimal point

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

What is a Boolean data type?

A

Can represent two logical states “True” or “False”

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

What is a Character data type?

A

Represents a single alphanumeric data item

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

What is a String data type?

A

one or more characters

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

What is a Date/time data type?

A

Contains details of an instant in time

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

What is a Pointer/reference data type?

A

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

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

What is a records data type?

A

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

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

What is an arrays data type?

A

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

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

What is a built in data type?

Give some examples

A

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

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

What are user defined data types?

A

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

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

What are variables?

A

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

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

What are Constants and how are they represented?

A

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

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

What is assignment?

A

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

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

What is a subroutine?

A

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

17
Q

What is a procedure?

A

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

18
Q

What is a function?

A

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

19
Q

What is iteration?

A

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

20
Q

What is definite iteration?

A

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

21
Q

What is indefinite iteration?

A

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

22
Q

When is a for loop used?

A

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

23
Q

When is a while used?

A

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

24
Q

When is a repeat until loop used?

A

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

25
Q

What are identifiers?

A

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

26
Q

What is selection?

A

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

27
Q

When are IF-THEN statements used?

A

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

28
Q

When are IF-THEN-ELSE statements used?

A

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

29
Q

When are nested IF-THEN-ELSE statements used?

A

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

30
Q

When are CASE statements used?

A

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

i.e. if, elif, elif, else

31
Q

What is a list data type?

A

It’s an abstract data type consisting of a number of elements in which the same item can appear more than once

32
Q

What can a list data type be used for?

A

It can be used to implement other non-built in data structures such as stacks, queues and trees