Remember the page fault ? It's similar, but the reason is different. Page fault is inherent in the virtual memory system . The segmentation fault is a in the (probably) code.
It occurs when you try to access a memory that is not available to your application. It was not allocated (reserved) for the running process. It also occurs when access is made to protected pages in the process, usually more when writing.
Your error
You can not write to address 0 in the memory of your application. And it's not just 0, others are also reserved. Actually not read in 0. You can not write in the code part (except special privilege), the code is fixed, it is static. The same goes for the static data part (usually placed by literals in your code).
Remembering that the memory address in question is virtual, it has nothing to do with physical memory.
What is Memory Segmentation?
Memory areas where each part is:
These are the segments, each with a different configuration in the operating system. These segments usually consist of several pages.
When the imgr will leave an image here: link
It can occur every time you perform an illegal, read, write, or execute operation. It's like in filesystem when trying to access a file without permission for that.
How does Memory Segmentation influence how my program works?
To develop the common nothing, but there has every organization of how the process will treat what is in memory. Of course he can not try to do operations on segments not allowed in the languages that allow this.
Is the segmentation fault generated by the above program related to Memory Segmentation or is it something else?
This error occurs because of access to something that is not authorized in that context. This does not occur in languages with managed memory, except for bug in runtime or language virtual machine.
These bugs often occur because of a problem handling pointers, but there are other situations that may occur.
Worse when segmentation fault does not occur. The hardware can not prevent all wrong access in memory and this becomes a logical error, much more difficult to detect.