Which of the following(s) can be used to access the first element of a vector v?

a) v.begin()
b) v.cbegin()
c) v[0]
d) all of the mentioned

1 thought on “Which of the following(s) can be used to access the first element of a vector v?”

  1. d
    Explanation: To access the first element of a vector we can use the following things:
    i) v.begin()
    ii) v.cbegin()
    iii) v[0]
    iv) v.at(0)

Leave a Comment