Menu

Casting - Quiz

1. Which term describes converting a value from one data type to another data type?

Casting
Assignment
Initialisation
Concatenation

2. What does the casting function int() do when it is applied to the string '42'?

It converts the string into an integer for use in calculations
It gives the Boolean True because the string is not empty
It converts the string into a real number with a decimal part
It joins the string to another string to make longer text

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic