Tesla Interview Question

Simple C and C++ stuff