2.2.2 - Data Types Flashcards

1
Q

What is an Integer?

A

A data type used to store positive and negative whole numbers

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

What is a Real?

A

A data type used to store numbers with a fractional part (decimals)

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

What is a Boolean?

A

A data type used to store one of two states, true or false
(or 0 & 1 or 0 & -1)
(often translated to yes/no, on/off)

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

What is a Character?

A

A single alphanumeric

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

What is a String?

A

A sequence of characters often stores as a variable in computer programs
Can include letters, numbers and symbols

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

What is Casting?

A

Converting a variable from one data type to another

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

Why is Casting necessary?

A

So sub-problems receive data in a format they are expecting
(allows numbers to be manipulated as strings, strings to become numbers etc.)

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