Exam 13: Overloading and Templates

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

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.8/5
(32)

Suppose cType is a class template,which can take int as a parameter.The statement: ____ declares x to be an object of type cType,and the type passed to the class cType is int.

(Multiple Choice)
4.8/5
(43)

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

(Short Answer)
4.9/5
(32)

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

(True/False)
4.7/5
(35)

Every object of a class maintains a (hidden)pointer to itself,and the name of this pointer is ____.

(Multiple Choice)
4.9/5
(33)

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

(Multiple Choice)
4.8/5
(39)

Classes with pointer member variables must include the ____________________ constructor.

(Short Answer)
4.8/5
(32)

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
(32)

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

(True/False)
4.9/5
(48)

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.8/5
(32)
Showing 41 - 50 of 50
close modal

Filters

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