A segmentation fault is caused because of bad coding practices. It is also called as sig failts. This kind of faults prevent the program or application to not continue further with execution.
Segmentation fault happens, If a application if tries to access a memory location which it should not.
Cause of segfaults
- If a buffer over flow happens.
- While dereferencing a NULL pointer.
- Using uninitialized pointer.
- Accessing a memory, that we should not (not belonging to the program)
Click on more to continue reading on detecting location of segfault and practices to avoid segfaults.


