What is the output of the following code snippet?
3: do { 4: int x = 1; 5: System.out.print(x++ + " "); 6: } while(x <= 10);
D.
The variable x is declared within the do-while statement, so it is out of scope on line 6.