DEV Community

Ram Kumar Shukla
Ram Kumar Shukla

Posted on

1

what is buffer in c/c++?

Buffer is a term that refers to a block of computer memory that serves as temporary storage area is called buffer. All standard input and output device contains an input and output buffer.
Some of the example of the buffer...

  • Computer which uses RAM as buffer.
  • In a video streaming a sections of the movie you are streaming downloads to your device to stay ahead of your viewing.

Data can placed in software buffer before it is processed, writing data to a buffer is much faster than direct operation.
using a buffer while programing in C/c++ speeds up calculation process. Buffers come in handy when a difference exists between the rate data is received and the rate it is processed.

If you want to store a array of characters after a some input to store that in desired location, then you must need to clear unwanted buffer first so as to get the next input in desired location.

cin.ignore() is used to ignore or clear one or more characters from the input buffer.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay