Multiple choice

Which of these variables are of type int?

  1. num = 5.6

  2. num = "3"

  3. num = 4

  4. num = 4.0

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

An integer (int) is a whole number without a decimal point. 'num = 4' is an integer, whereas 5.6 is a float and '3' is a string.