Exam 13: Overloading and Templates

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

The operator function that overloads the insertion operator, <<, or the extraction operator, >>, for a class must be a(n) ____________________ function of that class.

(Short Answer)
4.7/5
(40)

Which of the following is the general syntax of the function prototype to overload the pre-increment operator ++ as a member function?

(Multiple Choice)
4.9/5
(41)

Classes with pointer member variables must include the ____________________ constructor.

(Short Answer)
4.9/5
(33)

Passing a parameter to a class template has an effect at ____________________ time.

(Short Answer)
4.8/5
(36)

Both parameters of the function to overload the operator << are reference parameters.

(True/False)
4.8/5
(40)

The function that overloads the ____ operator for a class must be declared as a member of the class.

(Multiple Choice)
4.8/5
(32)

Suppose cType is a class template, and func is a member function of cType. The heading of the function definition of func is: ____.

(Multiple Choice)
4.7/5
(39)

The general syntax for the function prototype to overload the assignment operator = for a class is ____.

(Multiple Choice)
4.9/5
(41)

To include the operator function operator+ as a nonmember function of the class rectangleType, its prototype in the definition of rectangleType is: ____ rectangleType operator+(const rectangleType&, const rectangleType&);

(Multiple Choice)
4.9/5
(36)

To overload a(n) ____________________ operator for a class, if the operator function is a nonmember, it has one parameter.

(Short Answer)
4.9/5
(36)
Showing 41 - 50 of 50
close modal

Filters

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