Vidyalelo
C# Programming · Q170

Classes and Objects in C Sharp

Programming · C# Programming · question 170

Q170

What will be the output of the following C# code? using System; public class BaseClass public BaseClass() Console.WriteLine("I am a base class"); public class ChildClass : BaseClass public ChildClass() Console.WriteLine ("I am a child class"); static void Main() ChildClass CC = new ChildClass();

A.
I am a base class
I am a child class
Answer
B.
I am a child class
I am a base class
C.
Compile time error
D.
None of the mentioned

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board