Siemens Interview Question

Logical puzzles, academic project , c language question