Google News
logo
CPP - Quiz(MCQ)
What is the difference between begin() and rbegin()?
A)
begin() returns an iterator to the first element and rbegin() returns an iterator to an element kept at the end of the vector
B)
begin() returns an iterator to first element whereas rbegin() returns constant iterator to first element
C)
begin() returns returns first element rbegin() returns void
D)
both are the same

Correct Answer :   begin() returns an iterator to the first element and rbegin() returns an iterator to an element kept at the end of the vector


Explanation : begin() is used to return the iterator to the first element of the vector whereas rbegin() is used to return the an element stored at in the last of a vector.

Advertisement