Pre Final Quiz 2 Attempt Review PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

4/21/2021 Pre-final Quiz 2: Attempt review

Home / My courses / UGRD-IT6301-2026S / Week 11-15: Different ways to manage customer problems / Pre-final Quiz 2

Started on Friday, 12 March 2021, 9:58 AM


State Finished
Completed on Friday, 12 March 2021, 10:08 AM
Time taken 10 mins 7 secs
Grade 9.00 out of 10.00 (90%)

Question 1
Complete

Mark 0.00 out of 1.00

Let us assume that we have the following variables in our program:

int a = 2;
int b = 5;
int c = 3;
int intResult = 0;
boolean x = true;
boolean y = false;
boolean booleanResult = false;

What will be the value of intResult or booleanResult if we execute the following expressions?

intResult = a >> 2;

Answer: 0

Question 2
Complete

Mark 1.00 out of 1.00

Let us assume that we have the following variables in our program:

int a = 2;
int b = 5;
int c = 3;
int intResult = 0;
boolean x = true;
boolean y = false;
boolean booleanResult = false;

What will be the value of intResult or booleanResult if we execute the following expressions?

intResult = a & b;

Answer: 2

This study source was downloaded by 100000850007811 from CourseHero.com on 07-26-2022 07:10:57 GMT -05:00

https://semestral.amaesonline.com/2026/mod/quiz/review.php?attempt=59923&cmid=43407 1/5
https://www.coursehero.com/file/89598774/Pre-final-Quiz-2-Attempt-reviewpdf/
4/21/2021 Pre-final Quiz 2: Attempt review

Question 3
Complete

Mark 1.00 out of 1.00

Which is not a repetition control structure?

Select one:
a. switch

b. None of the choices

c. for

d. do while

e. while

Question 4
Complete

Mark 1.00 out of 1.00

Let us assume that we have the following variables in our program:

int a = 2;
int b = 5;
int c = 3;
int intResult = 0;
boolean x = true;
boolean y = false;
boolean booleanResult = false;

What will be the value of intResult or booleanResult if we execute the following expressions?

booleanResult = !((a + c) > b) && x;

Select one:
True

False

This study source was downloaded by 100000850007811 from CourseHero.com on 07-26-2022 07:10:57 GMT -05:00

https://semestral.amaesonline.com/2026/mod/quiz/review.php?attempt=59923&cmid=43407 2/5
https://www.coursehero.com/file/89598774/Pre-final-Quiz-2-Attempt-reviewpdf/
4/21/2021 Pre-final Quiz 2: Attempt review

Question 5
Complete

Mark 1.00 out of 1.00

What will be the output if you execute this code?

do{System.out.println("Hello World!");}while(true);
 

Select one:
a. None of the above.

b. The code will not run because of syntax error

c. print "Hello World"

d. Do nothing
 

e. print "Hello World" infinitely


 

Question 6
Complete

Mark 1.00 out of 1.00

Let us assume that we have the following variables in our program:

int a = 2;
int b = 5;
int c = 3;
int intResult = 0;
boolean x = true;
boolean y = false;
boolean booleanResult = false;

What will be the value of intResult or booleanResult if we execute the following expressions?

booleanResult = x && y || x;

Select one:
True

False

This study source was downloaded by 100000850007811 from CourseHero.com on 07-26-2022 07:10:57 GMT -05:00

https://semestral.amaesonline.com/2026/mod/quiz/review.php?attempt=59923&cmid=43407 3/5
https://www.coursehero.com/file/89598774/Pre-final-Quiz-2-Attempt-reviewpdf/
4/21/2021 Pre-final Quiz 2: Attempt review

Question 7
Complete

Mark 1.00 out of 1.00

Let us assume that we have the following variables in our program:

int a = 2;
int b = 5;
int c = 3;
int intResult = 0;
boolean x = true;
boolean y = false;
boolean booleanResult = false;

What will be the value of intResult or booleanResult if we execute the following expressions?

intResult = b % a;

Answer: 1

Question 8
Complete

Mark 1.00 out of 1.00

Which statement will check if x is equal to y?

Select one:
a. if (x<>y)

b. if (x>y)
 

c. if (y>y)
 

d. if (x!<y)
 

e. none of the choices

This study source was downloaded by 100000850007811 from CourseHero.com on 07-26-2022 07:10:57 GMT -05:00

https://semestral.amaesonline.com/2026/mod/quiz/review.php?attempt=59923&cmid=43407 4/5
https://www.coursehero.com/file/89598774/Pre-final-Quiz-2-Attempt-reviewpdf/
4/21/2021 Pre-final Quiz 2: Attempt review

Question 9
Complete

Mark 1.00 out of 1.00

Which of the following has the correct form for an if statement?

Select one:
a. none of the choices

b. if boolean_expression

c. if (boolean_expression)

d. boolean_expression

e. if boolean_expression

Question 10
Complete

Mark 1.00 out of 1.00

What will be the value of x after executing this code


for(int x=0; x<=10; x++) {} is run?
 

Select one:
a. 10
 

b. none of the above

c. 1

d. 0
 

e. 11
 

◄ Pre-final Quiz 1

Jump to...

Pre-final Exam ►

This study source was downloaded by 100000850007811 from CourseHero.com on 07-26-2022 07:10:57 GMT -05:00

https://semestral.amaesonline.com/2026/mod/quiz/review.php?attempt=59923&cmid=43407 5/5
https://www.coursehero.com/file/89598774/Pre-final-Quiz-2-Attempt-reviewpdf/
Powered by TCPDF (www.tcpdf.org)

You might also like