iPass interview question

some basic c programs and puzzles