When will the runtime error, “segmentation fault” occur?

Updated on September 1, 2017

The four common mistakes that lead to segmentation fault:

  1. Dereferencing NULL
  2. Dereferencing an uninitialized pointer
  3. Dereferencing a pointer that has been freed or that has gone out of scope
  4. Writing off the end of an array

Was this article helpful?

Related Articles

Leave a Comment