Do a similar exercise for shared_ptr, as we did for unique_ptr above (see here). The starting point is this program .
More specifically, from main pass a shared pointer to f. Do NOT return the pointer from f. f should be void.
Does the shared pointer survive when we return from f? What is the output in the last line of main?