Exam 13: Operator Overloading and Templates

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

A(n) ____________________ returns random numbers whose likelihoods correspond to a specific shape such as uniform or normal.

Free
(Short Answer)
4.9/5
(41)
Correct Answer:
Verified

distribution

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

Free
(Short Answer)
4.9/5
(41)
Correct Answer:
Verified

conversion

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

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

True

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.

(True/False)
5.0/5
(37)

A(n) ____ function is a nonmember function that has access to all members of the class.

(Multiple Choice)
4.9/5
(41)

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

In C++, >> is used as a stream extraction operator and as a right shift operator.

(True/False)
4.9/5
(31)

Using a class ____________________ allows you to define an arrayListType that can process any type of list.

(Short Answer)
4.7/5
(35)

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

(True/False)
4.8/5
(36)

With the exception of the ____________________ operator and the member selection operator, operators must be overloaded to be used on class objects.

(Short Answer)
4.8/5
(40)

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

(Multiple Choice)
4.8/5
(41)

In C++, operator is a reserved word.

(True/False)
4.8/5
(33)

To overload the pre-increment (++) operator as a member of a class, requires ____ parameter(s).

(Multiple Choice)
4.8/5
(40)

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

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

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

(Multiple Choice)
4.8/5
(37)

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

(Multiple Choice)
4.8/5
(30)

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

(Multiple Choice)
4.8/5
(40)

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

(Multiple Choice)
4.8/5
(37)

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

(Multiple Choice)
4.8/5
(34)
Showing 1 - 20 of 41
close modal

Filters

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