![]() These basic, advanced and latest OOPs questions will help you to clear your next Job interview. All answers for these OOPs questions are explained in a simple and easiest way. Here is a List of essential OOPs Interview Questions and Answers for Freshers and mid level of Experienced Professionals. In this post, we covered twenty C# OOPS interview questions and targeted a broad range of C# programming concepts.Top 14 OOPs Interview Questions and Answers Summary – 20 C# OOPS Interview Questions for Experienced ![]() What will be the output of the following code snippet? using System ĭ) 1, 8 C# OOPS Interview Questions Answer Key 1. What will be the output of the following code snippet? using System ĭ) 7, 1 Q-20. Which of the following represents a class that inherits an abstract class but it does not define all of its functions? What will be the output of the following code snippet? using System What will be the output of the following code snippet? using System ĭ) 1, 3 Q-17. 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? What will be the output of the following code snippet? using System Ĭonsole.WriteLine((no > 0 ? no : no * -1)) What will be the output of the following code snippet? using System ĭ) 8, 8 Q-14. ![]() What will be the output of the following code snippet? using System ĭ) Compile time error Q-12. Which of the following keywords is used to refer base class constructor to subclass constructor?ĭ) extend Q-11. What will be the output of the following code snippet? using System Ĭonsole.WriteLine("constructor 1 called") Ĭonsole.WriteLine("constructor 2 called") Which of the following statements is correct for run-time polymorphism?Ī) The overridden base method should be virtual, abstract, or override.ī) An abstract method is implicitly a virtual method.Ĭ) An abstract inherited property cannot be overridden in a derived class.ĭ) Both the override method and virtual method must have the same access level modifier. Which of the following is the correct name for selecting an appropriate method from a number of overloaded methods, by matching the arguments in terms of their number, type, order, and binding at compile time?ĭ) Compile time polymorphism. Which of the following code needs to be added for the overloaded operator “-” in C#? class exampleĬonsole.WriteLine(x + " " + y + " " + z) 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. What will be the correct order of execution of function func1(), func2() & func3() in the given code snippet? class baseclassįunc3() of base class get executed Q-5.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |