C# OOPS Interview Questions and Answers for Experienced - 1
Question: 1
Can you override private virtual methods?
No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.
Question: 2
What is polymorphism?
Mean by more than one form. Ability to provide different implementation based on different number/type of parameters.
Question: 3
What is pure-polymorphism?
When a method is declared as abstract/virtual method in a base class and which is overridden in a base class. If we create a variable of a type of a base class and assign an object of a derived class to it, it will be decided at a run time, which implementation of a method is to be called.
This is known as Pure-Polymorphism or Late-Binding.
Question: 4
What is a constructor?
A special Method Always called whenever an instance of the class is created.
Question: 5
What is a destructor?
A special method called by GC. Just before object is being reclaimed by GC.
Samacheer Kalvi 12th Computer Science Model Question Paper More
GATE Electronic Data Interchange Questions and Answers More
DBMS Multiple Choice Questions with Answers for GATE Pdf More
Computer Ethics MCQ Quiz with Answers More
IBPS Clerk Computer Awareness Question Bank Pdf More
200+ World Most Important Currency, Countries & Capitals Pdf More
Top 1000+ Analogy Verbal Reasoning/Ability Questions & Answers More
Top 100+ PL/SQL Interview Questions and Answers Pdf More
World History Objective Type Questions and Answers 2020-2021 More
Tabulation DI (Data Interpretation) Online Test More