Which string function is used to automatically decrease the capacity of the string and makes it equal to its size
recizen
Answers
Answered by
1
Answer:
void string ::resize (size_type num) num: New string length, expressed in ... Function to demonstrate insert ... If num > size() : character c is used to fill space.
C++ String shrink_to_fit() function - javatpoint
This function reduces the capacity of the string and makes it equal to its size. Syntax. Consider a string str. Synatx would be: str.shrink_to_fit();.
Explanation:
Hope it helps you dear friend.
Similar questions