Moxa Inc. interview question

c coding test, behavior