Home »
Aptitude Questions and Answers »
C# Aptitude Questions and Answers
C# Inheritance Aptitude Questions and Answers | Set 2
C# Inheritance Aptitude Questions | Set 2: This section contains aptitude questions and answers on C# Inheritance.
Submitted by Nidhi, on April 14, 2020
1) In the context of inheritance, a subclass is also known as?
- Base class
- Parent class
- Child class
- Derived class
Options:
- Only B
- Only C
- A and B
- C and D
Correct answer: 4
C and D
In C#.Net, in the context of inheritance, a subclass is also known as Child class and Derived class.
2) There are the following options are given below, which of them should be used to implement a 'kind of' relationship between two entities?
- Containership
- Encapsulation
- Inheritance
- Polymorphism
Options:
- Only A
- Only B
- Only C
- Only D
Correct answer: 3
Only C
In the OOP's, inheritance implements a 'kind of' relationship between two entities.
3) There are following options are given below, which of them should be used to implement a 'Has a' relationship between two entities?
- Containership
- Encapsulation
- Inheritance
- Polymorphism
Options:
- Only A
- Only B
- Only C
- Only D
Correct answer: 1
Only A
In the OOPs, Containership implements a 'kind of' relationship between two entities.
4) In the case of inheritance, which members of the parent class can be, access to the child class members?
- Private
- Protected
- Static
- Public
Options:
- Only A
- Only B
- A and C
- B and D
Correct answer: 4
B and D
The protected and public members of the parent class can be accessed to the child class.
5) There are following statements are given below, which of them are correct about inheritance in C#.NET?
- A child class object contains the entire parent class member.
- Inheritance can extend the parent class functionality.
- Inheritance cannot extend the parent class functionality.
- A child class may not be able to access all the parent class members.
Options:
- Only A
- Only B
- Only C
- A, B and D
Correct answer: 4
A, B and D
The A, B and D statements are correct about inheritance.