Tesla interview question

Simple C and C++ stuff