30.0k views
0 votes
What is the difference
between length and capacity?

1 Answer

3 votes

Answer:

length increase by the number of character append to the string. The capacity is increased only when the current capacity is exceeded by the new length

Explanation:

User Rajpurohit
by
6.2k points