MCQs > IT & Programming > Swift > let myChar: Character = 'b' Which code segment can be considered a complete Switch statement and will run without any error?

Swift MCQs

Given that we have defined myChar like so :
let myChar: Character = "b" Which code segment can be considered a complete Switch statement and will run without any error?

Answer

Correct Answer: switch myChar { case "a","A": println("The letter A") default: println("Not the letter A") }

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