Consider this piece of snippet :
char *str = "hellow Ghost";
str[0] = 'z';
printf("%s", str);
It is a segmentation fault. Also does it come under run time memory error ?
What I understood by segmentation fault is : Segmentation fault when you are accessing a memory that doesn't belong to you. It is basically a utility created for you to ease your work without letting you corrupt the memory.
How much and what kind of memory errors Segmentation fault covers and what invokes it to check out that a pointer or reference is wrong dealing with memory.
Run time error also occurs due to improper logic. Apart from that, are there any differences between run time error and segmentation fault regarding memory.