C Sharp (C#) - Polymorphism and Abstract Classes
Consider the following C# code:
What is the output?
class Animal { public virtual string Speak() => "..."; }
class Dog : Animal { public override string Speak() => "Woof"; }
class Cat : Animal { public override string Speak() => "Meow"; }
Animal a = new Dog();
Console.WriteLine(a.Speak());What is the output?
