Dynamic Memory A whole heap of fun⦠Review: The Stack C++ allocates variables on a stack void foo(int q) { if(true) { char c = 'a'; } } int main() { int x =…