1.

Which of the following statements is correct about the C#.NET program given below? namespace IndiabixConsoleApplication { class Baseclass { int i; public Baseclass(int ii) { i = ii; Console.Write("Base "); } } class Derived : Baseclass { public Derived(int ii) : base(ii) { Console.Write("Derived "); } } class MyProgram { static void Main(string[ ] args) { Derived d = new Derived(10); } } }

A. The program will work correctly only if we implement zero-argument constructors in Baseclass as well as Derived class.
B. The program will output: Derived Base
C. The program will report an error in the statement base(ii).
D. The program will work correctly if we replace base(ii) with base.Baseclass(ii).
Answer» E.


Discussion

No Comment Found

Related MCQs