I got a question about this code:
void main()
{
int *num = (int*)malloc(sizeof(int) * 10); /XXX
for (int i = 0; i < 10; i++)
num[i] = i;
int *num2 = (int*)malloc(sizeof(int) * 10);
for (int i = 0; i < 10; i++)
num2[i] = i + 10;
num = num2;
}
Is the memory in the XXX line deleted when I equal the first pointer to the second?