EY interview question

C++ Question. How to use smart pointer.