Sumo Digital interview question

Memory allocation in C++ vs C