Before solving the questions, if we think why they asked this particular question then probability of getting correct answer increased. For example this question is an example of Short-Circuit Evaluation.
Here is the Answer:
$z = 0$ : $x = 1$ and $y = 1$, Because $x++;$ will not be executed because condition is false
$z = 1$ : $x = 2$ and $y = 2$, Because $x++;$ will not be executed because condition is false
$z = 2$ : $x = 4$ and $y = 2$, Here $x++;$ will be executed, but $++y$ will not be executed due to short circuit evaluation
$z = 3$ : $x = 6$ and $y = 2$, Here $x++;$ will be executed, but $++y$ will not be executed due to short circuit evaluation
$z = 4$ : $x = 8$ and $y = 2$, Here $x++;$ will be executed, but $++y$ will not be executed due to short circuit evaluation
Hence at the end, It will print 8 2.