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?”
Leave a Comment
You must be logged in to post a comment.
a) v.size()
b) v.capacity()
c) v.max_size()
d) v.no_of_elements()
You must be logged in to post a comment.
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.