Siemens interview question

Logical puzzles, academic project , c language question