Segmentation fault is a fault that occurs because of illegal/invalid memory access. Illegal memory access means, When a program tries to access a memory location that is not allowed or when a program tries to access a memory location in a way that is not allowed.