C Sharp (C#) - Interfaces
Consider the following code snippet:
What will be the output when this code runs?
interface IAnimal { void Speak(); }
abstract class Mammal { public void Breathe() { Console.WriteLine("Breathing"); } public abstract void Speak(); }
class Dog : Mammal, IAnimal { public override void Speak() { Console.WriteLine("Woof"); } }
var dog = new Dog();
dog.Breathe();
dog.Speak();What will be the output when this code runs?
