At first in loop we are giving $x=0$ then $ptr$ is pointing to $X$.
So, $*ptr=0$
Now, we copying the value of $ptr$ to $y$ ,so $Y=0$
x=0; //value of x = 0
ptr= &x; // ptr points to variable x
y= *ptr; // Y contain value pointed by ptr i.e. x= 0;
Now, value of $ptr$ is changed to $1$. so the location of $X$ itself got modified
*ptr=1;
As it is pointing to $x$ so $x$ will also be changed to $1$
So, $1,0$ will be the value
C is correct answer here.