Object Oriented Programming

Mastering Virtual Functions
Test your knowledge of Object Oriented Programming with our engaging quiz focused on virtual fun
Key Features:
- 10 challenging multiple-choice questions
- Instant feedback on your answers
- Great for sharpening your programming skills!
Virtual function is ______ class function which expected to be redefined in ______ class, so that when reference is made to derived class object using pointer then we can call virtual function to execute ________ class definition version.
A) Base, derived, derived
B) Derived, Derived, Derived
C) Base, derived, base
D) Base, base, derived
What does a virtual function ensure for an object, among the following?
A) Correct method is called, regardless of the class defining it
B) Correct method is called, regardless of the object being called
C) Correct method is called, regardless of the type of reference used for function call
D) Correct method is called, regardless of the type of function being called by objects
Virtual functions are mainly used to achieve _____________
A) Compile time polymorphism
B) Interpreter polymorphism
C) Runtime polymorphism
D) Functions code polymorphism
Which keyword is used to declare virtual functions?
A) virtual
B) virt
C) anonymous
D) virtually
Where the virtual function should be defined?
A) Twice in base class
B) Derived class
C) Base class and derived class
D) Base class
The resolving of virtual functions is done at ______________
A) Compile time
B) Interpret time
C) Runtime
D) Writing source code
In which access specifier should a virtual function be defined?
A) Private
B) Public
C) Protected
D) Default
Virtual functions can never be made _______________
A) Static function
B) Parameterized function
C) Default argument function
D) Zero parameter function
Virtual functions can’t be made friend function of other classes.
A) True
B) False
Which is must condition for virtual function to achieve runtime polymorphism?
A) Virtual function must be accessed with direct name
B) Virtual functions must be accessed using base class object
C) Virtual function must be accessed using pointer or reference
D) Virtual function must be accessed using derived class object only
{"name":"Object Oriented Programming", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of Object Oriented Programming with our engaging quiz focused on virtual functions! Whether you're a student preparing for exams or a developer brushing up on your skills, this quiz covers essential concepts that everyone should know. Key Features: 10 challenging multiple-choice questions Instant feedback on your answers Great for sharpening your programming skills!","img":"https:/images/course8.png"}
More Quizzes
Midterm 2 Review Questions
1585
INTRODUCTION TO OOP AND UML QUIZ
201053
Quiz 2 - OOAD
5230
RFSW book club - Chapter 5 and 6
10523
Inheritance
10519
Are you a basic programmer ! Lets check
520
Object Oriented Programming
7427
Knowledge Check 3 Reviewer
61300
OOPS Introduction
3225
COMPROG
291426
Quiz
11625
C Test - 1 (07 June 2021)
10514
Make your own Survey
- it's free to start.
- it's free to start.