Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Includes 'real teacher' use videos.

Underflow and Overflow

Overflow and underflow are general terms. They describe the situation when something becomes too big or too small to be processed correctly or stored in the space allocated to it correctly.

Overflow and underflow examples
If you have a fixed-size data structure such as a stack that has been set up to hold twenty data items, and you try to add a twenty first data item, this will cause a 'stack overflow' error. This is because the data structure is not big enough to hold the extra piece of data you are trying to add to it.