Pointers & Memory

Answer & solution
Answer: C (no official key was published)
1. The code uses *px=*px−*py; *py=*px+*py; *px=*py−*px. For distinct valid integer objects and arithmetic without signed overflow, initial values x,y become x−y,y then x−y,x then y,x, correctly swapping.
2. If px=py, the first assignment zeroes the shared object and the result is not a swap unless it was zero. Invalid pointers may cause a segmentation fault.
3. Thus S2 and S4 are the intended statements: C. No pointer arithmetic occurs, and there is no intrinsic compilation error.
4. Signed overflow is an additional undefined-behavior limitation even with distinct accessible objects.
5. Teaching check: Aliasing is decisive: if px and py point to the same nonzero integer, the first subtraction writes zero and destroys the original value. With distinct valid cells the algebraic swap works only when each intermediate signed operation is representable. Dereferencing an invalid pointer is a further separate risk.