Figure 2 Dangling pointer resulting from shallow copy and subsequent deletion of string S