What is a potential consequence of not freeing dynamically allocated memory in a long-running C program?

  • Buffer overflow
  • Memory leaks
  • Null pointer dereference
  • Stack overflow
When dynamically allocated memory isn't freed, it leads to memory leaks. This means that the memory remains allocated and cannot be reclaimed for other purposes, which can result in a program consuming more and more memory over time.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *