In the previous article(Understanding storage of strings in C++-Part 1…. Stack or heap?), we tried to understand if string class stores the sting in stack or heap. In a gist, what we concluded in the previous article was that, when the strings are small, they are stared in the stack…