Segmentation Error In A Compiled C Program

Asked By 30 points N/A Posted on -
qa-featured

Sometimes when I run a c program in Turbo C I get a segmentation fault. So then I copy-paste the program onto a new file as told by my teachers. I want to know what it means and can it do any harm to my software.

SHARE
Answered By 20 points N/A #324221

Segmentation Error In A Compiled C Program

qa-featured

Segmentation fault occurs when there is memory corruption or when we are trying to do a write operation in a read-only location in memory, so basically it happens because of trying to access memory in a way that the processor or operating system will not allow, that is, it won’t allow you to access memory which is not yours. This type of error is common and is not specific to Turbo C. There is nothing to worry about because this is a common occurrence in systems having low space. So when you get this type of error what you do(copy-paste) is more than enough.

Related Questions