Chamberlain Group interview question

Discussed online coding test, programming in C