What type of value is created by a failable initializer in Swift?
Mutating methods can't be called on ____________ of a structure.
How can overridden properties be accessed in the subclass in Swift?
What is the correct way to define a deinitializer in Swift?
Can closures capture values from their surroundings ?
The options are
Which of the following are special cases of closures?
How are tuples with the same data types compared in Swift?
What will be the output of the following lines of code?
var someType = ["1":1,"2":2,"3":3]
if let unwrap = someType["1"] {
print(type(of: unwrap))
} else {
print("Not done")
}
What will be the output of the following code?
protocol SomeProtocol {
func someFunc()
}
class SomeClass : SomeProtocol {
// func someFunc() {
// print("Testing")
// }
}
SomeClass.someFunc()
What will be the output of the following code?
class SomeClass {
var someVar: Int = 20
static var anotherVar: Int = 30
func someFunc() {
SomeClass.anotherVar = 50
}
}
var someInstance = SomeClass()
someInstance.someFunc()
print(SomeClass.anotherVar)
OnSite
1 Openings
FullTime
Posted 17 days ago