1.4.1 Data Types 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.
2
Q
Perform an AND mask on the binary numbers:
10101101
01011011
A
00001001.
3
Q
Which data type stores a collection of characters?
A
String.
4
Q
Which data type stores just True and False?
A
Boolean.
5
Q
What is the effect of a logical shift left by one place?
A
The value is doubled.
6
Q
Perform an XOR mask on the binary numbers:
01010101
10111011
A
11101110
7
Q
Which is of the following is not a character?
8, %, R, 43
A
43