Exam 13: Overloading and Templates

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The only built-in operations on classes are assignment (=) and ____________________.

Free
(Short Answer)
4.8/5
(44)
Correct Answer:
Verified

member selection

A(n) ____________________ constructor converts its argument to an object of the constructor's class.

Free
(Short Answer)
4.8/5
(35)
Correct Answer:
Verified

conversion

When writing the definition of a friend function, the name of the class and the scope resolution operator precede the name of the friend function in the function heading.

Free
(True/False)
4.8/5
(29)
Correct Answer:
Verified

False

The ____________________ operator causes a member-wise copy of the member variables of the class.

(Short Answer)
4.7/5
(29)

The general form of the functions to overload the binary operators as member functions of a class is returnType operator#(____ className&) const;.

(Multiple Choice)
4.8/5
(33)

Which of the following is the syntax to declare the operator function operator[] as a member function of a class for nonconstant arrays?

(Multiple Choice)
4.9/5
(31)

When the post-increment operator is overloaded as a nonmember function of the class, the operator function has ____ parameter(s).

(Multiple Choice)
5.0/5
(37)

The associativity of the operator = is from right to left.

(True/False)
4.7/5
(35)

The return type of the function to overload the operator >> must be a reference to a(n) ____ object.

(Multiple Choice)
4.8/5
(44)

When an object invokes a member function, the member function references the pointer ____ of the object.

(Multiple Choice)
4.8/5
(32)

Any function that overloads an operator is called a(n) ____________________ function.

(Short Answer)
4.9/5
(38)

In C++, a function ____________________ can be overloaded.

(Short Answer)
4.8/5
(34)

In C++, operator is a reserved word.

(True/False)
4.8/5
(28)

A friend function does not have access to the private data members of the class.

(True/False)
4.9/5
(41)

Using a class template, you can write a single code segment for a set of related ____.

(Multiple Choice)
4.8/5
(34)

The name of the function to overload the operator <= is ____.

(Multiple Choice)
4.8/5
(36)

If you overload the binary arithmetic operator + as a member function, how many objects must be passed as parameters?

(Multiple Choice)
4.9/5
(38)

Class templates are called ____ types.

(Multiple Choice)
4.9/5
(28)

A conversion constructor is a(n) ____________________-parameter function.

(Short Answer)
4.8/5
(29)

The declaration of a friend function cannot be placed within the private part of the class.

(True/False)
4.9/5
(37)
Showing 1 - 20 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)