What is the value of q after the following code executes? m' is stored in memory starting at byte 2 and no problems with memory.
int m = 44;
int* p = &m;
int n = (*p)++;
int* q = p - 1;
++*q;
When I execute this code on gcc, the code initializes the memory pointed to by q to 1606417464 and then the last line changes it to 1606417465. This makes sense to me as this block of memory has not been assigned a value.
When I execute this code on my mac using xtools, the memory pointed to by q is initialized as zero and then changes to 1 after ++*q. Any idea why this behavior occurs?