What is the keyword used to declare an opaque type in Swift?
What feature of Swift enables closures?
What will be the output of the following code?
What is the default method type in a Swift protocol?
What data type is best used to represent Swift Error types using the Error protocol?
What will be the output of the following lines of code?
What will be the output of the following lines of code?
var airports: [String: String] = ["YYZ": "Toronto Pearson", "DUB": "Dublin"]
let airportCodes = Array(airports.keys)
print(type(of: airportCodes))
Which of the following statements about overriding initializers in Swift is invalid?
What will be the output of the following Swift code?
var threeDoubles = Array(repeating: 0.0, count: 3)
var anotherThreeDoubles = Array(repeating: 2.5, count: 3)
var sixDoubles = threeDoubles + anotherThreeDoubles
print(sixDoubles)
What will be the output of the following Swift code?
let anotherPoint = (2, 0)
switch anotherPoint {
case (let x, 0):
print("on the x-axis with an x value of \(x)")
case (0, let y):
print("on the y-axis with a y value of \(y)")
case let (x, y):
print("somewhere else at (\(x), \(y))")
}
OnSite
1 Openings
FullTime
Posted 17 days ago