OOPS MCQ Quiz Hub

OOPS Mcq Question Set 4

Choose a topic to test your knowledge and improve your OOPS skills

1. Which is the correct condition for function overriding?




2. Exactly same declaration in base and derived class includes________




3. How to access the overridden method of base class from the derived class?




4. The functions to be overridden ____




5. Which language doesn’t support the method overriding implicitly?




6. In C# ________




7. In Delphi _______




8. What should be used to call the base class method from the derived class if function overriding is used in Java?




9. In Kotlin, the function to be overridden must be ______




10. Abstract functions of a base class ______




11. If virtual functions are defined in the base class then ________




12. Which is private member functions access scope?




13. Which among the following is true?




14. Which member can never be accessed by inherited classes?




15. Which syntax among the following shows that a member is private in a class?




16. If private member functions are to be declared in C++ then ________




17. In java, which rule must be followed?




18. How many private member functions are allowed in a class?




19. How to access a private member function of a class?




20. Private member functions _______




21. Which function among the following can’t be accessed outside the class in java in same package?




22. If private members are to be called outside the class, which is a good alternative?




23. A private function of a derived class can be accessed by the parent class.




24. Which error will be produced if private members are accessed?




25. Can main() function be made private?




26. If a function in java is declared private then it ______




27. What does memory allocation for objects mean?




28. When is the memory allocated for an object?




29. Using new is type safe as ______




30. Which of the following function can be used for dynamic memory allocation of objects?




31. How much memory will be allocated for an object of class given below? class Test{ int mark1; int mark2; float avg; char name[10]; };




32. When is the memory allocated for an object gets free?




33. Which among the following keyword can be used to free the allocated memory for an object?




34. Which function is called whenever an object goes out of scope?




35. Which operator can be used to check the size of an object?




36. The memory allocated for an object ________




37. If an object is declared in a user defined function ___________




38. In java ________ takes care of managing memory for objects dynamically.




39. Which among the following are valid ways of overloading the operators?




40. Which among the following is mandatory condition for operators overloading?




41. When the operator to be overloaded becomes the left operand member then ______




42. If the left operand is pointed by *this pointer, what happens to other operands?




43. If a friend overloaded operator have to be changed to member overloaded operator, which operator should be used with the class name?




44. What is the syntax to overload an operator?




45. Why the left parameter is removed from parameter list?




46. Which object’s members can be called directly while overloading operator function is used (In function definition)?




47. If left operand member is specified directly in the function definition, which is the correct implicit conversion of that syntax?




48. When the friend operator overloading is converted into member operator overloading ____




49. Where in the parameter list is the implicit *this is added?




50. Which operator among the following can be overloading using only member function?