JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Inheritance interview questions
Inheritance interview questions
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 5
1. Which among the following best describes the Inheritance?
A. Copying the code already written
B. Using the code already written once
C. Using already defined functions in programming language
D. Using the data and functions into derived segment
Show Correct Answer
Correct Answer is :
Using the data and functions into derived segment
2. How many basic types of inheritance are provided as OOP feature?
A. 4
B. 3
C. 2
D. 1
Show Correct Answer
Correct Answer is :
4
3. Which among the following best defines single level inheritance?
A. A class inheriting a derived class
B. A class inheriting a base class
C. A class inheriting a nested class
D. A class which gets inherited by 2 classes
Show Correct Answer
Correct Answer is :
A class inheriting a base class
4. Which among the following is correct for multiple inheritance?
A. class student{public: int marks;}s; class stream{int total;}; class topper:public student, public stream{ };
B. class student{int marks;}; class stream{ }; class topper: public student{ };
C. class student{int marks;}; class stream:public student{ };
D. class student{ }; class stream{ }; class topper{ };
Show Correct Answer
Correct Answer is :
class student{public: int marks;}s; class stream{int total;}; class topper:public student, public stream{ };
5. Which programming language doesn’t support multiple inheritance?
A. C++ and Java
B. C and C++
C. Java and SmallTalk
D. Java
Show Correct Answer
Correct Answer is :
Java
Similar Interview Questions
Search for latest jobs
Find Jobs