I just starting to learning vectors and little confused about size() and capacity() I know little about both of them. But why in this program both
size()
capacity()
Size() returns how many values you have in the vector.
Size()
And capacity() returns size of allocated storage capacity means how many values it can hold now.