if you want to remove an article from website contact us from top.

    run time polymorphism is achieved only when a ……………….. is accessed through a pointer to the base class.

    Mohammed

    Guys, does anyone know the answer?

    get run time polymorphism is achieved only when a ……………….. is accessed through a pointer to the base class. from screen.

    Others: UGC NET CSE

    Runtime polymorphism can be achieved by: Accessing virtual function through the pointer of the base ... object The derived class None of these

    UGC NET CSE | June 2007 | Part 2 | Question: 15

    asked in Others Mar 28, 2020

    edited May 21, 2021 by soujanyareddy13

    1,271 views

    1 Answer

    ← Previous Next →

    ← Previous in category

    Next in category →

    Related questions

    Send feedback Rank Predictor College Prediction Useful Links FAQ Corrections Discuss Copyright Request Testimonials Chat Logs Chat Badges Search tips Exam Category Blog Category Blog Tags Privacy Test Series Contact Us

    Developed by Chun

    स्रोत : gateoverflow.in

    MCQ On Polymorphism, Pointer & Virtual Function In C++

    This set of MCQ on polymorphism, pointer & virtual function in C++ includes collections of multiple-choices questions on polymorphism, pointers, and their types

    PROGRAMMING MCQS

    MCQ On Polymorphism, Pointer & Virtual Function In C++

    MAY 26, 2017 Share on Facebook Share on Twitter

    This set of MCQ on polymorphism, pointer & virtual function in C++ includes collections of top 20 multiple-choices questions on run time polymorphism, compile-time polymorphism, pointers, and their types, void pointers, null pointers, object pointer, this pointer along with pointer expressions and pointer arithmetic. It also includes virtual functions, pure virtual functions with their properties.

    1. In compile-time polymorphism, a compiler is able to select the appropriate function for a particular call at the compile time itself, which is known as …………

    A) early binding B) static binding C) static linking D) All of the above

    2. ……………. binding means that an object is bound to its function call at compile time.

    A) late B) static C) dynamic D) fixed

    3. C++ supports run time polymorphism with the help of virtual functions, which is called …………….. binding.

    A) dynamic B) run time C) early binding D)static

    4. State whether the following statements about pointers in C++ are True.

    i) A pointer can be incremented (++) or decremented (–)

    ii) Any integer can be added to or subtracted from a pointer

    iii) One pointer can be subtracted from another

    A) i and ii only B) ii and iii only C) i and iii only

    D) All i, ii and iii

    5. ………………. are also known as generic pointers, which refer to variables of any type.

    A) void pointers B) null pointers C) this pointer D) base pointer

    6. The pointers which are not initialized in a program are called ……………..

    A) void pointers B) null pointers C) this pointer D) base pointer

    7. …………………… is useful in creating objects at run time.

    A) void pointer B) null pointer C) this pointer D) object pointer

    8. A …………………. refers to an object that that currently invokes a member function.

    A) void pointers B) null pointers C) this pointer D) base pointer

    9. The …………………. cannot be directly used to access all the members of the derived class.

    A) void pointers B) null pointers C) this pointer D) base pointer

    10. Run time polymorphism is achieved only when a ……………….. is accessed through a pointer to the base class.

    A) member function B) virtual function C) static function D) real function

    Read Also: Multiple Choice Questions On C++ Operator Overloading

    11. If a ……………………… is defined in the base class, it need not be necessarily redefined in the derived class.

    A) member function B) virtual function C) static function D) real function

    12. …………………………. is a function declared in a base class that has no definition relative to the base class.

    A) member function B) virtual function

    C) pure virtual function

    D) pure function

    13. State whether the following statements about virtual functions are True or False.

    i) A virtual function, equated to zero is called pure virtual function.

    ii) A class containing pure virtual function is called an abstract class

    A) True, True B) True, False C) False, True D) False, False

    14. The main objective of an abstract base class is to provide some traits to the derived class and to create a ………………………. required for achieving run time polymorphism.

    A) void pointers B) null pointers C) this pointer D) base pointer

    15. State, whether the following statements about virtual functions are True.

    i) The virtual function must be a member of some class

    ii) virtual functions cannot be static members

    iii) A virtual function can not be a friend of another class.

    A) i and ii only B) ii and iii only C) i and iii only

    D) All i, ii and iii

    16. The important application of ………………… is to return the object it points to.

    A) void pointers B) null pointers C) this pointer D) base pointer

    17. The pointer to a function is known as …………………. function.

    A) forward B) pointer C) callback D) backward

    18. We can manipulate a pointer with the indirection operator (*), which is also known as ……………………

    A) reference operator

    B) dereference operator

    C) direction operator

    D) indirection operator

    19. Using the ………………………., we can change the contents of the memory location.

    A) reference operator

    B) dereference operator

    C) direction operator

    D) indirection operator

    20. If we attempt to dereference an uninitialized pointer, it will ………………….. by referring to any other location in memory.

    A) cause a compile-time error

    B) run time error

    C) cause run time error

    D) executes

    Answers

    1. D) All of the above

    2. B) static 3. A) dynamic

    4. D) All i, ii and iii

    5. A) void pointers 6. B) null pointers

    7. D) object pointer

    8. C) this pointer 9. D) base pointer

    10. B) virtual function

    11. B) virtual function

    स्रोत : www.siteforinfotech.com

    Runtime polymorphism is achieved only when a virtual function is accessed through a pointer to the b...

    MCQs: Runtime polymorphism is achieved only when a virtual function is accessed through a pointer to the base class. - Computer Science MCQs - C++ Programming Questions

    C++ Programming Questions

    Home >> Category >> Computer Science MCQs >> C++ Programming Questions >> Runtime polymorphism is achieved only when a virtual function is accessed through a pointer to the b...

    « Previous Next »

    Engineering MCQs CBSE MCQs

    Q.  Runtime polymorphism is achieved only when a virtual function is accessed through a pointer to the base class.a. Trueb. False

    See Answer

    MCQs:  The code of statements which may cause abnormal termination of the program should be written under_________ block.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Object based language differs from object oriented language as it does not support features _____ . 1. Encapsulation 2. Inheritance 3. Dynamic Binding 4. Abstraction 5. Polymorphism

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  When a virtual function is redefined by the derived class, it is called___________.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  In any ways, Non-member function cannot have access to the private data of the class.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  In CPP, dynamic memory allocation is done using ______________ operator.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Can we allocate memory for the objects dynamically in CPP?

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  If the derived class is struct, then default visibility mode is _______ .

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Which of the following manipulator is used for the representing octal equivalent of a given decimal number?

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Which of the following is not a casting operator in CPP?

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  ___________ header file is used for manipulators.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  While redefining a virtual function in the derived class, if its prototype is changed then ___________________ .

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  const member function does not allow to modify/alter value of any data member of the class.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  In a program, If there exists a function template with two parameters and normal function say void add(int , int), so add(3,4) will _____________________ .

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Can struct be used as Base class for inheritance ?

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  In case of inheritance where both base and derived class are having constructors, when an object of derived class is created then___________ .

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Which of the following is not a file opening mode ____ .

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Attempting to throw an exception that is not supported by a function call results in calling _____________ library function.

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  How can we restrict a function to throw certain exceptions?

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  Is it possible to define a constructor with default arguments?

    Category: Computer Science MCQs,   Published by: teswesm

    MCQs:  The purpose of explicit keyword is to tell the compiler that a certain constructor may not be used to implicitly cast an expression to its class type.

    Category: Computer Science MCQs,   Published by: teswesm

    « Previous Next »

    Related Questions

    Find the wrong statement/s about Abstrac...

    Assigning one or more function body to t...

    Function overloading can also be achieve...

    In nested try block, if inner catch hand...

    A function can be declared as friend max...

    Which of the following statements are no...

    When a child class inherits traits from ...

    In case of inheritance where both base a...

    __________________ is the OOP feature an...

    Which of the followings is/are not keywo...

    We can create objects of the abstract cl...

    Which of the followings are true about V...

    If a class contains static variable, the...

    Which of the following are member derefe...

    In Multipath inheritance, in order to re...

    If base class has constructor with argum...

    Using friend operator function, followin...

    An operator function is created using __...

    Classes in CPP are________ .

    Can we define our exceptions in CPP?

    स्रोत : teswesm.com

    Do you want to see answer or more ?
    Mohammed 15 day ago
    4

    Guys, does anyone know the answer?

    Click For Answer