Runtime Error - SIGSEGV code example

Example 1: what is sigsegv error in c++

A SIGSEGV is an error(signal) caused by an invalid memory
reference or a segmentation fault.
You are probably trying to access an array element out of bounds or 
trying to use too much memory.

Example 2: runtime error sigsegv

A SIGSEGV is an error(signal) caused by an invalid memory reference or a 
segmentation fault. You are probably trying to access an array element out of 
bounds or trying to use too much memory. Some of the other causes of a 
segmentation fault are : Using uninitialized pointers, dereference of NULL 
pointers, accessing memory that the program doesn’t own.

Tags:

Cpp Example