Which of the following operations do random access iterators have?
a. Prefix operator* to make available the container element for use as l-value or r-value.
b. Overloaded binary operator+ to add an int value to the iterator to move the place the iterator points forward by the argument number of elements.
c. Overloaded binary operator* to multiply the iterator by an int value to move the place the iterator points by a number of elements equal to the argument.
d. Overloaded unary operator++ to move the place the iterator points forward by one element.
e. Overloaded unary operator-- to move the place the iterator points backward by one element.
f. Overloaded operator== and operator!= to determine whether two iterators point to the same element.
All are correct except part c). There is no binary overloaded operator* for any kind of iterator.
You might also like to view...
Which of the following is the best type of tool for breaking up input validation into separate steps?
a. Boolean method b. nested if statement c. void method d. none of these
Which of the following business continuity plans focus on the initial response to a disaster and includes plan activation, notification, evacuation, and communication?
A) Response plans B) Contingency plans C) Recovery plans D) Resumption plans
Write a method called power the computes xn where x and n and positive integers. The method has two integer parameters and returns a value of type long.
What will be an ideal response?
Header ___________ must be included for class string.
Fill in the blank(s) with the appropriate word(s).