Can I free pointer address without malloc?
You didn’t actually allocate any memory, neither on the stack nor on the heap. You’re just pointing your variable at an address and then pretend that the memory there belongs to you. This is not legal in either C or C++ and will generally not work. And “not work” can really mean anything here. And … Read more