New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Why does the program crashes if a pointer is left uninitialized in c++ ?
2 Answers
+ 3
If you try to dereference an uninitialised pointer you will get a segmentation fault because you are trying to access unallocated memory.
+ 1
We try to access Unallocated memory which cause error