Q:
Virtual functions are mainly used to achieve _____________
belongs to collection: OBJECT ORIENTED PROGRAMMING MEMBER FUNCTIONS MCQ
OBJECT ORIENTED PROGRAMMING MEMBER FUNCTIONS MCQ
- Virtual function is
- What does a virtual function ensure for an object, among the following?
- Virtual functions are mainly used to achieve _____________
- Which keyword is used to declare virtual functions?
- Where the virtual function should be defined?
- The resolving of virtual functions is done at ______________
- In which access specifier should a virtual function be defined?
- Virtual functions can never be made _______________
- Virtual functions can’t be made friend function of other classes
- Which is must condition for virtual function to achieve runtime polymorphism?
- Which among the following is true for virtual functions?
- The virtual functions must be declared and defined in _____________ class and overridden in ___________ class
- It is __________ to redefine the virtual function in derived class?
- Which among the following best defines the abstract methods?
- Which among the following is true ?
- How are abstract functions different from the abstract functions?
- It is _________________________ to define the abstract functions
- The abstract function definitions in derived classes is enforced at _________
- What is this feature of enforcing definitions of abstract function at compile time called?
- What is the syntax for using abstract method?
- If a function declared as abstract in base class doesn’t have to be defined in derived class then ______
- Static methods can’t be made abstract in java
- Which among the following is true?
- Which among the following is correct for abstract methods?
- If a class have all the abstract methods the class will be known as ___________
- The abstract methods can never be ___________ in a base class
- The abstract method definition can be made ___________ in derived class
- Simple member functions are ______________________
- What are static member functions?
- How can static member function can be accessed directly in main() function?
- Correct syntax to access the static member functions from the main() function is:
- What are const member functions?
- Which among the following best describes the inline member functions?
- What are friend member functions (C++)?
- What is the syntax of a const member function?
- Which keyword is used to make a nonmember function as friend function of a class?
- Member functions _____________________
- All type of member functions can’t be used inside a single class
- Which keyword is used to define the static member functions?
- Which keyword is used to define the inline member function?
- Which among the following are valid ways of overloading the operators?
- Which among the following is mandatory condition for operators overloading?
- When the operator to be overloaded becomes the left operand member then ______________
- If the left operand is pointed by *this pointer, what happens to other operands?
- If a friend overloaded operator have to be changed to member overloaded operator, which operator should be used with the class name?
- What is the syntax to overload an operator?
- Why the left parameter is removed from parameter list?
- Which object’s members can be called directly while overloading operator function is used (In function definition)?
- If left operand member is specified directly in the function definition, which is the correct implicit conversion of that syntax?
- When the friend operator overloading is converted into member operator overloading _______________
- Where in the parameter list is the implicit *this is added?
- Which operator among the following can be overloading using only member function?
- Which operator among the following can be overloaded using both friend function and member function?
- All the operators can be overloaded using the member function operator overloading
- Which operator among the following must be overloaded using the friend function?
- How much memory will be allocated for an object of class given below?
- Which among the following best describes member function overriding?
- Which is the correct condition for function overriding?
- Exactly same declaration in base and derived class includes______________
- Which among function will be overridden from the function defined in derived class below:
- How to access the overridden method of base class from the derived class?
- The functions to be overridden _____________
- Which language doesn’t support method overriding implicitly?
- In C# ____________________
- In Delphi ______________
- What should be used to call the base class method from the derived class if function overriding is used in Java?
- In Kotlin, the function to be overridden must be ______________
- Abstract functions of a base class _________________
- If virtual functions are defined in the base class then _______________
- Which feature of OOP is exhibited by the function overriding?
- What are constant member functions?
- Which keyword must be used to declare a member function as a constant member function?
- Which objects can call the const functions?
- Non-const functions _______________________
- Which is a correct condition on const member functions?
- If a const object calls a non-const member function then ____________________
- Can a constructor function be constant?
- A function can have both the const and non-const version in the same program
- How is it possible to have both const and non-const version of a function?
- When both the const and non-const version of a functions are required?
- If a function is to be made const, which is the correct syntax?
- Functions which differ in const-ness are considered ______________________
- If const version of a function when overloading is used, the function ___________________
- Which among the following is recommended for const functions?
- Use of const member function in a program _________________________
- Which is private member functions access scope?
- Which among the following is true?
- Which member can never be accessed by inherited classes?
- Which syntax among the following shows that a member is private in a class?
- If private member functions are to be declared in C++ then _____________
- In java, which rule must be followed?
- How many private member functions are allowed in a class ?
- How to access a private member function of a class?
- Private member functions ____________
- Which function among the following can’t be accessed outside the class in java in same package?
- If private members are to be called outside the class, which is a good alternative?
- A private function of a derived class can be accessed by the parent class
- Which error will be produced if private members are accessed?
- Can main() function be made private?
- If a function in java is declared private then it __________________
- What are public member functions?
- Which among the following is true for public member functions?
- Which type of member functions get inherited in the same specifier in which the inheritance is done? (If private inheritance is used, those become private and if public used, those become public)
- Which syntax among the following is correct for public member functions?
- Which syntax is applicable to declare public member functions in C++?
- In java, which rule among the following is applicable?
- How many public members are allowed in a class?
- Which is not a proper way to access public members of a class?
- Which call is correct for public members of a nested class?
- Which public function call among the following is correct outside the class, if return type is void (C++)?
- If public members are to be restricted from getting inherited from the subclass of the class containing that function, which alternative is best?
- A derived class object can access the public members of the base class
- If a class have a public member function and is called directly in the main function then ___________________________
- The function main() must always be public
- All the public member functions ___________________
(c).Runtime polymorphism
need an explanation for this answer? contact us directly to get an explanation for this answer