Apple Interview Question

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