#include <stdio.h>
#include <stdlib.h>
typedef struct node{
struct node *pre;
struct node *next;
int data;
}NODE; //struct declaration
int main(){
NODE *new_node=(NODE*)malloc(sizeof(NODE)); //memory allocation
printf("\nnew_node addr: %d\n",new_node);
free(new_node); //deallocation
printf("new_node addr: %d\n",new_node);
}
Result:
new_node addr: 2097152
new_node addr: 2097152
Program ended with exit code: 0
Why the results are same?
I deallocate the new_node's memory. But new_node has address.
Why??