For unlimited access to Study Guides, a Grade+ subscription is required.
16. What does the following program print? int x = 10; void setup() { int 2 times Two (x); println(x); println(z); A. 10, 10, 20 B. 10, 20, 10 c. 10, 20, 20 D. 20, 20, 10 E. 20, 10, 20 int timesTwo (int y) { x = y* 2; println(y); return x;
17. What does the following program print? int x = 10; void setup() { int z = times Two (x); println(x); println (2); A. 10, 10, 20 B. 10, 20, 10 c. 10, 20, 20 D. 20, 20, 10 E20, 10, 20 int timesTwo (int x) { x = x + 2; println(x); return x;
35. What does the following program print? int( data = {10,20,30,40,50); for (int i = data.length-2; i >= 0; i--) { data[i+1] = data[i]; for (int i = 0; i < data.length; i++) { print (data[i] + " "); A. 10 20 30 40 50 B. 50 40 30 20 10 C. 10 10 20 30 40 D. 20 30 40 50 50 E 10 20 20 30 40