I have a problem which will take 1000000 lines of inputs like below from console.
0 1 23 4 5 1 3 5 2 56 12 2 3 33 5 ... ...
I have used scanf,
You use multiple reads with a fixed size buffer till you hit end of file.
read