ExamVeda
Login
Home
Classes and Objects in C Sharp
?

What will be the Correct statement in the following C# code?
class baseclass
{
    int a;
    public baseclass(int a1) 
    {
        a = a1;
        console.writeline(" a ");
    }
    class derivedclass : baseclass
    {
        public derivedclass (int a1) : base(a1)
        {
            console.writeline(" b ");
        }
    }
    class program
    {
        static void main(string[] args)
        {
            derivedclass d =  new derivedclass(20);
        }
    }
}

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.