Which of the following function is used to get the actual number of elements stored in vector?

a) v.size()
b) v.capacity()
c) v.max_size()
d) v.no_of_elements()

1 thought on “ Which of the following function is used to get the actual number of elements stored in vector?”

  1. a
    Explanation: To get the number of elements stored in the vector v we use the function v.size(). It returns how many elements are currently in the vector excluding the void places.

Leave a Comment