See complete series on pointers and dynamic memory in C/C++ here:
In this lesson, we have explained the concept of memory leak in C/C++. This is a good interview question also. Memory leak happens due to improper use of dynamic memory in a program when we get some memory using malloc and do not free it, when its not being used.
Feel free to drop your comments, feedback and suggestions.
For practice problems and more, visit:
Like us on Facebook:
Follow us on twitter: