Module 4 (Operator Overloading, Friends, and References)

¡Supera tus tareas y exámenes ahora con Quizwiz!

A friend function has access only to the private members and member functions of the class (and all objects of that class) of which it is a friend

False

If a unary operator is overloaded as a stand-alone function, the argument may be any type

False

One can guarantee left to right evaluation of the arguments to a comma expression overloading

False

Overloading a binary operator as a member requires to arguments

False

When overloading an operator, you can create a new operator different from the more usual operators

False

You can change the behavior of for the int type using operator overloading

False

An overloaded operator [] must be non-static class member

True

C++ allows overloading of the function application operator ()

True

It is impossible to get short-circuit behavior for overloaded operator && or operator ||

True

I want to have a nonmember function to have access to the private members of a class. The class must declare that function a

friend (if a class declares a function to be a friend, it is granting access to the private members(it already has access to the public members)


Conjuntos de estudio relacionados

13 MKC1 CH-12 Public Relations and Sales Promotions

View Set

Chapter 1: Motivation & Leadership

View Set

MacroEconomics Chapter 22 hmwk quiz

View Set

Public health ento exam 4 (PPT 4-6)

View Set

Schizophrenia Meds - Practice Questions

View Set

Introduction to Development/ erikson & piaget's theory

View Set

QUIZ: Sub-queries and MERGE Statement

View Set

Ch. 14 Module 4: Sections 14.07-14.09 Dynamic Study Module

View Set