Samsung Electronics interview question

c,c++