int main()
{
    int x = 30, *y, *z;
    y = &x; 
    /* Assume address of x is 500 and integer is 4 byte size */
    z = y;
    *y++ = *z++;
    x++;
    printf("x=%d, y=%d, z=%d\n", x, y, z);
    return 0;
}
The above is the code. 
The output is: x=31, y=504, z=504
Please correct me if I'm wrong:
From what I understand: y=&x; assigns the address of x to y. So, y now holds the value of 500. 
z=y; Since y = 500, this assigns 500 to z.
What really confuses me is this part *y++=*z++;, I don't exactly know what this means as there's many things going on at the same time. z gets incremented and pointed to somewhere (AND where is it pointing actually? There is no address assigned to it like y i.e y=&x;. Then *y also gets incremented at the same time (are you even allowed to do that?). 
Another thing that confuses me is that: in my opinion, since y points to x, when y++ happens, x should be incremented to 31, and then when going down the code block x++ happens, x should now be 32.
So, question is, how did we get that output of x=31, y=504, z=504? Thank you. 
 
    