Apple interview question

And some coding questions about C: build a data struct that can handle infinite input.