Search Header Logo

quiz20191231-g1-2

Authored by zhang liling

10th - 12th Grade

Used 10+ times

quiz20191231-g1-2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Each of the following code segments is intended to print the word Hello. Which of the following code segments works as intended?

I. System.out.print("Hello");

II. System.out.print(Hello);

III. System.out.print(He);System.out.print(llo);

I only

II only

III only

I and II

II and III

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider the following code segment.

int a = 5;

int b = 8;

int c = 3;

System.out.println(a + b / c * 2);

What is printed as a result of executing this code?

2

6

8

9

14

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following code segment.

double x = 4.5;

int y = (int) x * 2;

System.out.print(y);

What is printed as a result of executing the code segment?

8

8.0

9

9.0

19

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Consider the following code segment.

int a = 5;

int b = 4;

int c = 2;

a *= 3;

b += a;

b /= c;

System.out.print(b);

What is printed when the code segment is executed?

2

4

9

9.5

19

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Consider the following code segment.

int x = 7;

if (x < 7)

x = 2 * x;

if (x % 3 == 1)

x = x + 2;

System.out.print(3 * x);

What is printed as a result of executing the code segment?

7

9

14

21

27

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?