I wrote a small program for memory allocation using new operator. Following is the code:
p= new int;
printf("\n address of p = %X\n",p);
Every time I'm running this code, I'm getting same memory address. But I want to get different address in different run. How can I achieve this requirement using 'new' operator? Shall I have to use any option? Please help me out. Any help will be appreciated.
Thanks in advance.