Sobes.tech
Junior — Senior

What output will appear in the console?

livecode

Task condition

Determine which text will be output to the console and explain the reason.


protocol Test {
    func test()
}

extension Test {
    func test() { 
        print("A") 
    }
}

struct Cat: Test {
    func test() { 
        print("C") 
    }
}

var a: Test = Cat()
a.test()