1.4.1 Data Types Flashcards

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

What data type should be used for storing a phone number like 07886756443?

A

String, numeric types would omit the leading 0.

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

Perform an AND mask on the binary numbers:
10101101
01011011

A

00001001.

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

Which data type stores a collection of characters?

A

String.

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

Which data type stores just True and False?

A

Boolean.

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

What is the effect of a logical shift left by one place?

A

The value is doubled.

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

Perform an XOR mask on the binary numbers:
01010101
10111011

A

11101110

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

Which is of the following is not a character?

8, %, R, 43

A

43

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