1) Variables are classified according to their : 2) A) names B) loc ation in the programC) data type D) value What does the following code print to the screen? Display "hello "; A) HELLO C) nothing B) Hello D) hell o 3) How many times will the following loop iterat e? Setk =1 While k > 5 Displ ay k End While A)Two B) OneC) Infinite D) No iterationsE) Five4) How many times would the following lo op iterate? Set k 1 While k <= 5 Display k Set k = k + 1 End While A)3C) infinte B) 5 D) 4
Question
Variables are classified according to their : 2) A) names B) loc ation in the programC) data type D) value What does the following code print to the screen? Display "hello "; A) HELLO C) nothing B) Hello D) hell o 3) How many times will the following loop iterat e? Setk =1 While k > 5 Displ ay k End While A)Two B) OneC) Infinite D) No iterationsE) Five4) How many times would the following lo op iterate? Set k 1 While k <= 5 Display k Set k = k + 1 End While A)3C) infinte B) 5 D) 4
Solution
-
Variables are classified according to their: C) data type
-
The following code prints to the screen: B) Hello
-
The following loop will iterate: D) No iterations, because the condition for the loop to run (k > 5) is not met since k is set to 1.
-
The following loop would iterate: B) 5 times, because the loop will run as long as k is less than or equal to 5, and k is incremented by 1 in each iteration.
Similar Questions
1) Variables are classified according to their : 2) A) names B) loc ation in the programC) data type D) value What does the following code print to the screen? Display "hello "; A) HELLO C) nothing B) Hello D) hell o 3) How many times will the following loop iterat e? Setk =1 While k > 5 Displ ay k End While A)Two B) OneC) Infinite D) No iterationsE) Five4) How many times would the following lo op iterate? Set k 1 While k <= 5 Display k Set k = k + 1 End While A)3C) infinte B) 5 D) 4
What will print out when the following code runs?
How many lines of output will be displayed when the following code is executed?display “Hello”for x = 1 to 4 display “Outer loop”, x for y = 1 to 6 step 2 if y > x then display “Inner loop”, y endif next ynext xdisplay “end”a.12b.10c.8d.14
What is the output of the following code snippet?int i = 0;while (i < 5) { if (i == 3) break; System.out.print(i + " "); i++;}Question 5Answera.0 1 2 4b.1 2 3 4c.0 1 2 3 4d.0 1 2
How many times will the following code print "Welcome to Instacks"?int count = 0;do { System.out.println("Welcome to Instacks"); count++;} while (count < 10);891011
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.