| |
GeekInterview.com > Interview Questions > Concepts
| Print | |
Question: what is actually meant for BUFFER? how does it work
|
| January 01, 2008 06:07:40 |
#2 |
| jana05 |
Member Since: January 2008 Total Comments: 4 |
RE: what is actually meant for BUFFER? how does it work |
Its a temporary location where you can preserve the data. For example when you want to swap 2 nos like x=2 and y=5, so that after swaping you get x=5 and y=2. One method wud be to use a temporary variable like z and copy x value to z, so z=2. Then copy y value to x, so x=5. Finally, copy z value to y, so y=2. Here z is temporary variable and the BUFFER.
Similarly, when you watch videos online, all the data is copied to a temporary location or buffered and then the video can be watched. Buffers are used in almost all programming tasks. Its like a helper to your main task. It does work by itself, it is used by other tasks to make a bigger task possible. |
| |
Back To Question | |