Hi,
I want to read 1MB chars from stdio into array. But I will never know how big is the input, it can be 1B and in next run it can be 432kB and so on. Allowed chars are:
- digits,
- letters,
- white cars.
scanf() does not work as it stops at white char. I know that I can use 'l' prefix and specify size e.g. 1000000 - however I'm not sure will scanf() stop after NULL if 'l=1000000'?



. EOF will be returned appon the end of the stream also. Matsp has already said, stdin is just a FILE *. Treat it the same. Don't think of 'STDIN' as the keyboard, think of it as the standard stream for input, file or keyboard it doesn't matter.