C# QUIZ 7 2 Created on May 24, 2020 By Sirjana GhimireAcharya C# Quiz 7 1 / 10 1. What will be the output of the following code snippet?public class emp{public static int age = 40;public static int salary = 25000;}public class record :emp{new public static int salary = 90000;static void Main(string[] args){Console.WriteLine(emp.age + " " + emp.salary + " " + salary);}} 40, 25000, 90000 40, 25000, 25000 40, 90000, 90000 Error 2 / 10 2. Which of the following keyword, enables to modify the data and behavior of a base class by replacing its member with a new derived member? overloads overrides new base 3 / 10 3. Which of the following statements are correct for C# language? Every derived class does not define its own version of the virtual method. By default, the access mode for all methods in C# is virtual. If a derived class, does not define its own version of the virtual method, then the one present in the base class gets used. All of the above. 4 / 10 4. Which of the following keywords is used to refer base class constructor to subclass constructor? this static base extend 5 / 10 5.What will be the output of the following code snippet?class sample{int i;public sample(int x){i = x;Console.WriteLine("Tech");}}class derived : sample{public derived(int x) :base(x){Console.WriteLine("Beamers");}}class Program{static void Main(string[] args){derived k = new derived(12);Console.ReadLine();}} TechBeamers 12 Tech Beamers 12 Compile time error 6 / 10 6.What will be the output of the following code snippet?class sample{int i;public sample(int num){num = 12;int j = 12;int val = num * j;Console.WriteLine(val);}}class sample1 : sample{public sample1(int a) :base(a){a = 13;int b = 13;Console.WriteLine(a + b);}}class sample2 : sample1{public sample2(int k) :base(k){k = 24;int o = 6 ;Console.WriteLine(k /o);}}class Program{public static void Main(string[] args){sample2 t = new sample2(10);Console.ReadLine();}} 4, 26, 144 26, 4, 144 144, 26, 4 0, 0, 0 7 / 10 7.What will be the output of the following code snippet?class sample{static sample(){int num = 8;Console.WriteLine(num);}public sample(int a){int val = 10;Console.WriteLine(val);}}class Program{static void Main(string[] args){sample s = new sample(100);Console.ReadLine();}} 10, 10 0, 10 8, 10 8, 8 8 / 10 8. Which of the following options represents the type of class which does not have its own objects but acts as a base class for its subclass? Static class Sealed class Abstract class Derived class 9 / 10 9. Which of the following represents a class that inherits an abstract class but it does not define all of its functions? Abstract A simple class Static class derived class 10 / 10 10.What will be the output of the following code snippet?namespace TechBeamers{public abstract class sample{public int i = 7;public abstract void print();}class sample1: sample{public int j;public override void print(){Console.WriteLine(i);Console.WriteLine(j);}}class Program{static void Main(string[] args){sample1 obj = new sample1();sample obj1 = new sample1();obj.j = 1;obj1.i = 8;obj.print();Console.ReadLine();}}} 0, 8 1, 8 1, 7 7, 1 Your score is The average score is 30% LinkedIn Facebook Twitter 0% Restart quiz