Junior — Senior
What output will program №13 produce
livecode
Task condition
Consider the following Swift code and determine which lines will be printed to the console upon program termination.
import UIKit
class Alpha {
deinit {
print("A")
}
}
class Beta {
let a = Alpha()
deinit {
print("B")
}
}
class Gamma: Alpha {
let b = Beta()
deinit {
print("C")
}
}
var instance: Gamma? = Gamma()
instance = nil