What data type is returned when a data type conversion can potentially fail?
What is the exact opposite of opaque types?
Which keyword is used to declare weak references or variables in Swift?
What kind of initializer delegation is allowed for value types in Swift?
Is it necessary to define the data types of the parameters in Swift closures?
Which properties are used in Swift to get the minimum and maximum value of an integer type?
What types of methods can be overridden in Swift?
What will be the output of the following code?
func addTwoInts(_ a: Int, _ b: Int) -> Int {
return a + b
}
var mathFunction: (Int, Int) -> Int = addTwoInts
print(mathFunction(3, 9))
When does Swift use default initializers for classes?
What will be the output of the following code?
func swapTwoInts(_ a: inout Int, _ b: inout Int) {
let temporaryA = a
a = b
b = temporaryA
}
var someInt = 3
var anotherInt = 107
swapTwoInts(&someInt, &anotherInt)
print("someInt is now \(someInt), and anotherInt is now \(anotherInt)")