A1: No, you can't, because of arr pointer refers to a static storage of "Nisse" string literal (it may be write-protected storage or not, but it's not a dynamic storage from the heap)...
A2: See above...
A3: The best solution: Do nothing to delete string literal via its pointer!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.