[Solved] Stream vs Buffer

Uday Kiran Asks: Stream vs Buffer
there I’m new to C. I’m currently reading the K&R. There I got confused by a definition in it about the text streams “A text stream is a sequence of characters divided into new lines;each line consists of 0 or more characters followed by a newline character.” And trying to knowing about this streams I was introduced to a new term namely buffer.

I just know that:

  • A continuous flow of data (bytes or characters) in between Input and Output devices is
    a STREAM .
  • A temporary storage area in main memory to store the input or output data temporarily is a BUFFER.

I don’t say that I’m right, but it’s my basic idea upon those terms.

I want to know, what actually buffer & stream are and how these 2 things(i.e, stream & buffer) work together, in the non-abstract level of C implementation.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.