Chapter 10. Managing Memory

So far, every one of this book's programs has used a fixed amount of memory to accomplish its task. This fixed amount of memory was known and specified (in the form of a variable) when the program was written. These programs could not increase or decrease the amount of memory available for the storage of user data during runtime. Instead, such changes had to be done in the program's source code file, and the program had to be recompiled and re-executed.

But the real world is dynamic, and so is the input that has to be processed by a C program (for example, users need to be able to submit a varying amount of text in most applications). To handle situations where the amount of data to be stored is not known in advance, ...

Get C Programming: Visual Quickstart Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.