Stack vs heap, malloc/calloc/realloc/free, new/delete, memory leaks, dangling pointers and double free, with outputs checked by compiling.