actually what is buffer why the values will be stored in buffer during programming
The term “buffer” is a very generic term. It’s a place to store something temporarily, in order to balance the difference between input speed and output speed.
In programming buffer is a block of RAM that is used to hold the values of input and output temporarily.
If you have heard about this “Producer-Consumer problem”, you maybe well aware of these things that if a producer produces at a higher rate it can store things that the consumer will use in future. If the consumer speeds up it can read from the buffer instead of waiting. The buffer is there in the middle to bridge the gap between different speeds of consumer and producer.