Multiple choice

Which of the following statements is FALSE?

  1. In statically typed languages, each variable in a program has a fixed type

  2. In un-typed languages, values do not have any types

  3. In dynamically typed languages, variables have no types

  4. In all statically typed languages, each variable in a program is associated with values of only a single type during the execution of the program

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

(1) True for statically typed languages where each variable has fixed type. Similarly (4) is also correct. (2) True, in un-typed languages types of values are not defined. But option (3) is false, since in dynamically typed language variables have dynamically changing types but not that they have no type.