ExamVeda
Login
Home
Classes and Objects in C Sharp
?

What will be the output of the following C# code?
interface i1
{
    void f1();
}
interface i2 :i1
{
    void f2();
}
public class maths :i2
{
    public void f2()
    {
        Console.WriteLine("fun2");
    }
    public void f1()
    {
        Console.WriteLine("fun1");
    }
}
class Program
{
    static Void Main()
    {
        maths m = new maths();
        m.f1();
        m.f2();
    }
}

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.