MCQs > IT & Programming > Swift > What is the output of this segment of code? var x = 0 for index in 1...5 { ++x } println('\(x)')

Swift MCQs

What is the output of this segment of code?
var x = 0
for index in 1...5 {
++x
}
println("\(x)")

Answer

Correct Answer: 5

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Swift Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Swift Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it