C/C++ Does memory allocated in the stack get cleared?

  c++, memory

If we allocate memory on the stack like so:

void foobar()
{
    int arr[10];
}

After foobar’s scope, the reference to this memory block (arr) is lost. But is it set to zero?

Source: Windows Questions C++

LEAVE A COMMENT