« Segmentation fault

Understand segmentation fault

Segmentation fault

Cases when segmentation fault might occur:

  1. You created an array of size 10 or 12 but you are trying to access location 20 or 25.
  2. Or you are asking for more memory but program is out of memory already, it doesn't have more memory available.