Undoing the effects of ungetc() : “How” do fseek(),rewind() and fsetpos() do it?Is buffer refilled each time?
问题 Huh!!How shall I put the whole thing in a clear question!!Let me try: I know that the files opened using fopen() are buffered into memory.We use a buffer for efficiency and ease.During a read from the file, the contents of the file are first read to the buffer,and we read from that buffer.Similarly,in a write to the file, the contents are written to the buffer first ,and then to the file. But what with fseek() , fsetpos() and rewind() dropping the effect of the previous calls to ungetc() ?