Home / MCQ Bank / Computer
Computer Classes And Objects In C Sharp Difficulty: Medium

Select the statement which should be added to the current C# 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 */ } }

Select the correct option to test your answer:

More Computer Questions

What is the output of the following code: def my_function(a, b): return a * b result = my_function(4, 0) print(result) What will be the output of the following Python code? import time t=(2010, 9, 20, 8, 15, 12, 6) time.asctime(t) What is the purpose of the reverse() method for lists? The problem of finding a list of integers in a given specific range that meets certain conditions is called? What will be the output of the following C# code? static void Main(string[] args) { int a = 5; if (Convert.ToBoolean((.002f) -(0.1f))) Console.WriteLine("Sachin Tendulkar"); else if (a == 5) Console.WriteLine("Rahul Dravid"); else Console.WriteLine("Ms Dhoni"); Console.ReadLine(); }