The Answer is C). X=20
When While loop enters for the first time, x=0. So, It enters the loop. Then there is infinite for loop where it breaks when x becomes multiples of 10.
When ++x becomes 10, then 10%10==0 → True, so, it breaks the for loop
After that, It goes again into while loop, where it checks condition for x<=10 and it gets satisfied as x=10 now. So, The For loop again iterates for 10 times till x becomes 20. When X=20, It breaks the for loop. Now, The while condition is checked x>10. Condition fails.
Finally, It prints X=20