a) both are the same
b) begin() returns an iterator to the first element and rbegin() returns an iterator to an element kept at the end of the vector
c) begin() returns an iterator to first element whereas rbegin() returns constant iterator to first element
d) begin() returns returns first element rbegin() returns void
1 thought on “What is the difference between begin() and rbegin()?”
Leave a Comment
You must be logged in to post a comment.
b
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.