Menu

Casting - Quiz

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

Concatenation
Assignment
Casting
Initialisation

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

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
It converts the string into an integer for use in calculations

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic