Draper interview question

Basic C++/OOP questions.