Page 1 of 1

Select the statement which should be added to the current C# code to get the output as 10 20?

Posted: Wed Jul 13, 2022 7:56 pm
by answerhappygod
class baseclass{ protected int a = 20;}class derived : baseclass{ int a = 10; public void math() { /* add code here */ } }
a) Console.writeline( a + ” ” + this.a);
b) Console.Writeline( mybase.a + ” ” + a);
c) console.writeline(a + ” ” + base.a);
d) console.writeline(base.a + ” ” + a);