Search Header Logo

ITSS 3311 FINAL REVIEW

Authored by deb g

Other

University

Used 9+ times

ITSS 3311 FINAL REVIEW
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The following program prints “Welcome to Java” 100 times.

int count = 0;

if (count < 100) {

System.out.println(“Welcome to Java!”);

count++;

}

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times does the following program print “Welcome to Java!”?

int count = 0;

while (count < 10) {

System.out.println(“Welcome to Java!”);

count += 3;

}

10

6

4

3

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following program?

int count = 0;

while (count < 10) {

String s = “Welcome to Java!”;

count++;

}

System.out.println(s);

You cannot define a new variable inside a loop (i.e. String s defined in the while loop.)

Variables defined in a while loop cannot be accessed outside the loop (String s variable is used outside the while loop.)

You cannot use a variable in the loop when the variable is defined outside the loop (i.e. int count is defined outside the loop, but used/incremented inside the loop)

No error in the code

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many times does the following program print “Welcome to Java!”?

10

11

1

Error: Count is not initialized

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the value of count and sum after the following program?

count is 5, sum is 10

count is 5, sum is 5

count is 2, sum is 1

count is 3, sum is 10

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which numbers does the following program print?

1, 4, 7, 10

4, 7, 10

1, 4, 7

4, 7

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

When does the loop below terminate?

When the user does not enter any integer

When the user enters a negative integer

When the user enters zero

The loop never ends (infinite loop)

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?