Font size
Worksheets45. Programming 1 : Data Types and Casting
Total questions: 1
Worksheet time: 7mins
What data type should be used to store a whole number?
Boolean
String
Integer
Float
Which data type uses more memory to store the number 22?
Float
Boolean
Character
Integer
What is the result of concatenating '8' and '5' if they are stored as strings?
13
85
40
None of the above
What command is used to convert a data type into a string?
INT
FLOAT
BOOL
STR
What data type should be used to store a user's age?
Boolean
String
Integer
Character
Why should a telephone number be stored as a string?
Because it represents a true or false value
Because it is a whole number
Because it can start with a zero
Because it contains letters
What is casting in programming?
A type of data structure
A method of inputting data
Changing a data type from one type to another
Changing a variable's value
Which of the following is NOT a data type mentioned in the text?
Integer
Real
Character
Array
What data type should be used to store a flag indicating if something has happened or not?
Float
Boolean
Integer
String
What is the correct data type for storing a person's name?
String
Integer
Boolean
Character
