--:--









Quiz for Overloading unary and binary operators

Course: C++ Language | Subject: Unit 5 | Topic: Operator Overloading and Type Conversion



Logo

Q1: Which operator is a unary operator?

Logo

Q2: Which operator is a binary operator?

Logo

Q3: How do you overload a unary operator as a member function?

Logo

Q4: How do you overload a binary operator as a member function?

Logo

Q5: Which operator++ overload is postfix?

Logo

Q6: Which operator++ overload is prefix?

Logo

Q7: What is the correct signature for overloading the unary minus operator as a member function?

Logo

Q8: Which of these is the correct way to overload binary + operator?

Logo

Q9: When overloading binary operators as non-member functions, how many parameters are required?

Logo

Q10: Which operator cannot be overloaded as a non-member function?

Logo

Q11: Can unary operators be overloaded as non-member functions?

Logo

Q12: Which keyword is used to specify an operator function?

Logo

Q13: How to distinguish prefix and postfix operator++ in overloading?

Logo

Q14: Which of the following is a valid unary operator to overload?

Logo

Q15: When overloading operator+, what is typically the operand type?

Logo

Q16: Is it possible to overload the operator[]?

Logo

Q17: Which operator is overloaded to support function call syntax?

Logo

Q18: Can operator overloading change operator precedence?

Logo

Q19: What is the return type for overloaded unary operators usually?

Are you ready to start test? Set your time limit