C# QUIZ 8 1 Created on May 24, 2020 By Sirjana GhimireAcharya C# Quiz 8 1 / 10 1. Which of the following represents the process of defining two or more methods within the same class having the same name but different parameters list? Method overloading Method overriding Encapsulation None of the mentioned 2 / 10 2. Which of the following are applicable for overloading? Constructors Methods Both a & b None of the mentioned 3 / 10 3. Which of the following statements is correct? On using the new keyword as a modifier, it explicitly hides a member inherited from a base class. Operator overloading works differently for structures and classes. It is not necessary that all operator overloads are static methods of the class. The cast operator can be successfully overloaded. 4 / 10 4. Which of the following statements are correct? You cannot overload the conditional logical operators. If you overload the binary operator then the corresponding assignment operator, if any, must be explicitly overloaded. We can use the default equality operator in its “overload” implementation. A public or “nested public”, reference type does not overload the equality operator. 5 / 10 5. Which of the following modifier applies when a virtual method is redefined by a derived class? overloads override virtual overridable 6 / 10 6. Which of the following keyword should be prefixed to a member of the base class to allow overriding in the derived class? overload override new virtual 7 / 10 7. What will be the output of the following code snippet?class sample{public int x;public double y;public int sum(int a, int b){x = a + b;return x;}public int sum(double c, double d){y = c + d;return (int)y;}public sample(){this.x = 0;this.y = 0;}}class Program{static void Main(string[] args){sample s = new sample();int a = 4;double b = 3.5;s.sum(a, a);s.sum(b, b);Console.WriteLine(s.x + " " + s.y);Console.ReadLine();}} 4, 3.5 8, 0 7.5, 8 8, 7 8 / 10 8. What will be the output of the following code snippet?class sample{public int func(int k, int y){return k + y;}public int func1(int t, float z){return (t+(int)z);}}class Program{static void Main(string[] args){sample s = new sample();int i;int b = 90;int c = 100;int d = 12;float m = 14.78f;i = s.func(b, c);Console.WriteLine(i);int j = (s.func1(d, m));Console.WriteLine(j);Console.ReadLine();}} 190, 26.78f 0, 26.78f 190, 26 190, 0 9 / 10 9. Which of the following represents the process where a method in a subclass has same name & type signature as a method in its superclass? Method overloading Method overriding Method hiding None of the mentioned 10 / 10 10.Which of the following modifiers can be used to prevent Method overriding? Static Constant Sealed final Your score is The average score is 70% LinkedIn Facebook Twitter 0% Restart quiz