What Will Be The Output Of The Following C Codep Pre Langcsharp #430
What will be the output of the following C# code?</p> <pre><code class="language-csharp" line="1"> interface i1 { void fun(); } interface i2 { void fun(); } public class maths :i1, i2 { void i1.fun() { Console.WriteLine("i1.fun"); } void i2.fun() { Console.WriteLine("i2.fun"); } } class Program { static void Main(string[] args) { Sample obj = new Sample(); i1 i = (i1) obj; i.fun(); i2 ii = (i2) obj; ii.fun(); } } </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Object Oriented Concepts - Interfaces Implementation - Quiz No.1.