Explain the scenarios when C++ program might crash.

It may happen when we try to
1) Dereference a null pointer
2) Dereference a dangling pointer
3) Access an object which is not constructed at all
4) Invoke delete operator on already deleted object
5) Throwing exception from a destructor
6) Unhandled exception
7) accessing array index beyond its boundary

Comments