Answer Posted / jailani
in many situation segmentation faults can occur. the main
situations are
1. when you are trying to access the null pointer
2.access to memory that already freed
3.dereferencing null pointer and uninitialized pointer
4.and also some compiler give segmentation fault when stack
overflow will occur
the concept behind the segmentation fault is that every
program has some space on memory for it execution like
storing variables in stack and heap. when you are try to
access the out of memory that has allocated.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers