Sail E0 Webinar
Question
Select the statement which should be added to the current set of code to get the output as 10 20 ?
class baseclass{    protected int a = 20;}class derived : baseclass{    int a = 10;    public void math()    {         /* add code here */    }   }
Options:
A .  Console.writeline( a + " " + this.a);
B .  Console.Writeline( mybase.a + " " + a);
C .  console.writeline(a + " " + base.a);
D .  console.writeline(base.a + " " + a);
Answer: Option B





Submit Your Solution Below and Earn Points !

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers