How many queries can be chained using optional chaining?
Which of the following are types of closures in programming?
Does Swift provide signed floating-point number types?
What are the keywords used to declare type methods in classes in Swift?
When are semicolons required in Swift?
What will be the output of the following lines of code ?
protocol SomeProtocol {
func someFunc()
}
class SomeClass : SomeProtocol{
func someFunc() {
print("10")
}
}
var someInstance = SomeClass()
someInstance.someFunc()
What happens in the two phases of initialization in Swift?
What will be the output of the following lines of code?
var someType = [1,2,3]
if let end = someType.last {
print(type(of:end))
} else {
print("Not done")
}
What will be the output of the following lines of code?
class Test {
var x: Int = 0
static func testing() {
print("Just something")
}
}
class Test_two: Test {
override static func testing() {
print("Other thing")
}
}
What will be the output of the following Swift code?
var favoriteGenres: Set<String> = ["Rock", "Classical", "Pop"]
if let removedGenre = favoriteGenres.remove("Pop") {
print("\(removedGenre)? I'm over it.")
} else {
print("I never much cared for that.")
}
OnSite
1 Openings
FullTime
Posted 17 days ago