MathWorks Interview Question

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