Explanation for buffered and unbuffered getchar