MathWorks interview question

Question from C, C++