Operator Overloading – MCQs July 22, 2025 by u930973931_answers 30 Score: 0 Attempted: 0/30 Subscribe 1. : What is operator overloading in C++? (A) Assigning a new meaning to an existing operator (B) Creating a new operator (C) Changing the syntax of C++ (D) Modifying built-in data types 2. : Which keyword is used to overload an operator in C++? (A) overload (B) operator (C) override (D) function 3. : Which of the following operators cannot be overloaded in C++? (A) + (B) [] (C) :: (D) = 4. : What type of function is typically used for operator overloading? (A) Constructor (B) Member function or friend function (C) Virtual function (D) Pure virtual function 5. : Which operator must be overloaded as a class member function? (A) = (B) + (C) * (D) << 6. : Can we overload the function call operator ()? (A) No (B) Only for integers (C) Yes (D) Only in templates 7. : What does overloading the == operator allow? (A) Redefining how two objects are compared for equality (B) Adding two objects (C) Assigning values to objects (D) None of the above 8. : Which operator is generally overloaded as a friend function? (A) = (B) << (C) () (D) [] 9. : What is the return type of an overloaded assignment operator? (A) void (B) bool (C) reference to the class (D) pointer to the class 10. : Can we overload the [] operator? (A) Yes (B) No (C) Only in templates (D) Only with friend functions 11. : Which of the following can be overloaded? (A) . (dot) (B) sizeof (D) new 12. : Which operator is overloaded for input stream extraction? 13. : How many arguments does a unary operator function take? (A) None (B) One (C) Two (D) Three 14. : What is the syntax to define an overloaded operator as a member function? (A) returnType operator op(parameterList) (B) returnType overload op(parameterList) (C) function operator(parameterList) (D) void op(parameterList) 15. : What does overloading the << operator allow? (A) Input from console (B) Output to console (C) File reading (D) File writing 16. : Can we overload all relational operators in C++? (A) Yes (B) No (C) Only == and != (D) Only > and < 17. : Which operator is used to dereference a pointer? (A) * (B) & (D) % 18. : The new and delete operators can be overloaded to: (A) Create new syntax (B) Perform custom memory management (C) Replace constructors (D) Replace main function 19. : Operator overloading provides: (A) More than one meaning to an operator (B) Less readability (C) Syntax errors (D) Less memory usage 20. : Can operator overloading improve code readability? (A) Yes (B) No (C) It depends on the operator (D) Only in templates 21. : Which operator is used to access class members using pointers? 22. : Which operator cannot be overloaded even as a member function? (A) + (C) sizeof (D) [] 23. : What is required to overload an operator? (A) A function definition using the keyword operator (B) A macro (C) A struct (D) A constant 24. : Can all arithmetic operators be overloaded? (A) Yes (B) No (C) Only + and – (D) Only / and * 25. : What type of polymorphism is operator overloading? (A) Runtime (B) Compile-time (C) Dynamic (D) None 26. : What is the return type of the overloaded [] operator? (A) void (B) int (C) depends on use (D) char 27. : When overloading the increment (++) operator, how is the postfix version distinguished? (A) By using an int dummy parameter (B) By using float (C) By using double (D) By using a pointer 28. : What is the main advantage of operator overloading? (A) Compact syntax (B) Shorter main function (C) Faster compilation (D) More variables 29. : Which operators can be overloaded as both member and non-member functions? 30. : Is it possible to overload operators in C language? (A) Yes (B) No (C) Only in latest versions (D) Only with macros