Consider the following ‘C’ code
Assume P1 and P2 are two concurrent processes and sharing the global variables x, y and z. Assignments
and tests are atomic. Consider the following statements :
S1 : P1 and P2 terminates S2 : P1 terminates but P2 does not
S3 : P2 terminates but P1 does not S4 : Neither P1 nor P2 terminates
my answer S1 and S4 but solution is different