var s = Array(repeating: 0, count: 3)
print(s[2])
What is the default access level in Swift?
What operators are used to check if two instances of a class are the same object in memory?
What attribute is used to indicate that a class should be editable in Interface Builder?
What kind of initializers are created for classes in Swift?
When are trailing closures used in Swift?
Which of the following is not defined by a protocol in Swift?
What will be the output of the following lines of code ?
class Test {
var x: Int = 0
func printSomething(_ x:Int) {
self.x+=x
}
}
var test = Test()
test.printSomething(20)
print(test.x)
Which of the following is a valid operation in Swift?
What will be the output of the following Swift code?
let name: String? = nil
if let someVar = name {
print(someVar)
} else {
print("There is nil in optional")
}
OnSite
1 Openings
FullTime
Posted 17 days ago