The execution of C programs may terminate abruptly when an error is detected. But unlike other programming languages, when an error is detected, instead of printing a detailed report on the error, C programs only print the succinct message Segmentation fault. There is no additional information about the cause of the error, so you need to review you code and its execution to fix it.