MathWorks interview question

Friend Function in C++ and follow up question about constructor in friend function