Answer:
The answer to this question is y=-1.
Explanation:
First of all this code snippet will give error if used in the program.There is semi colon missing after y=-1 and after that there should be closing curly brace instead of open in last line.
x and y are initialized with 0.
In switch we have x+1 means we have switch(1).So case 1 will be executed the value of y will become 1.But there is no break statement after that so the compiler will not come out of the switch it will execute the next line in switch statement.default will be executed and the value of y will become -1.