The compiler does this for you in debug mode, so if you accidentally read uninitialized memory, you will see the distinctive value 0xCC and find out that you (probably) read uninitialized memory. The value 0xCC has many other useful properties, for example, it is a machine language instruction for calling a software breakpoint if you accidentally start uninitialized memory.
The basic principle: to simplify the identification of values โโobtained by reading uninitialized memory.
This does not happen in your release builds.
This technique was introduced in writing solid code .
Ken bloom
source share