Question:

What output will be produced by the code below?

var i = 2

do {
    print(i)
    i *= 2
} while (i < 128)

Answer:

Correct answer: This code will not compile.

Explanation: The do keyword is invalid here; the programmer should use repeat instead.


Keywords:

© 2017 QuizBucket.org