Assuming a variable f has been initialized to 5, which of the following statements sets g to 0?

6.Assuming the variablescorehas been assigned the value 9, which of the followingstatements displaysXXX?a.if(score <= 9) System.out.println("XXX");b.if(score > 9); System.out.println("XXX");c.if(score > 0); System.out.println("XXX");d.All of the above displayXXX.

7.What is the output of the following code segment?t = 10;if(t > 7){System.out.print("AAA");System.out.print("BBB");}

Get answer to your question and much more

8.What is the output of the following code segment?

Get answer to your question and much more

if(t > 7)System.out.print("AAA");System.out.print("BBB");

Get answer to your question and much more

9.What is the output of the following code segment?t = 7;if(t > 7){System.out.print("AAA");System.out.print("BBB");}a.AAAb.BBBc.AAABBBd.nothing

10.When you code anifstatement within anotherifstatement, the statements are____________.

Get answer to your question and much more

11.The operator that combines two conditions into a single Boolean value that istrueonlywhen both of the conditions aretrueis ____________.

Get answer to your question and much more

12.The operator that combines two conditions into a single Boolean value that istruewhen atleast one of the conditions istrueis ____________.

Get answer to your question and much more

13.Assuming a variablefhas been initialized to 5, which of the following statements setsg0?toa.if(f > 6 || f == 5) g = 0;b.if(f < 3 || f > 4) g = 0;c.if(f >= 0 || f < 2) g = 0;d.All of the above statements setgto 0.

14.Which of the following has the lowest precedence?

Get answer to your question and much more

15.Which of the following statements correctly outputs the names of voters who live in district 6and all voters who live in district 7?

Get answer to your question and much more

16.Which of the following displaysErrorwhen a student ID is less than 1000 or more than9999?

Get answer to your question and much more

17.You can use the ____________ statement to terminate aswitchstatement.a.switch

b.breakc.cased.end18.Which of the following cannot be the argument tested in aswitchstatement?

Get answer to your question and much more

19.Assuming a variablewhas been assigned the value 15, what does the following statementdo?w == 15 ? x = 2 : x = 0;wxx

Get answer to your question and much more

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

When you code an if statement within another if Statement The statements are quizlet?

Terms in this set (20) When you code an if statement within another if statement, the statements are nested.

Which of the following is typically used in a flowchart to indicate a decisions?

Flowcharts typically use the following main symbols: A process step, usually called an activity, is denoted as a rectangular box. A decision is usually denoted as a diamond.

Which of the following data types can store the value 0 using the least amount of memory?

The data type that can store the value 0 using least amount of memory is “ Byte ”.

What is the logical structure in which one instruction occurs after another with no branching?

A sequence structure is a logical structure, in which one program statement occurs after another statement without branching. Hence, correct answer is option “ A ”.