Question: Question 1 ( 2 points ) What is the value of j when the above code is done executing? Assume there are no syntax errors
Question points
What is the value of j when the above code is done executing?Assume there are no syntax errors and the code will compile.
int j;
int total ;
for j ; j ; j
total total j;
Question options:
A
B
C
D
Question points
What is the value of total when the loop is done? Assume there are no syntax errors and the code will compile.
int j;
int total ;
for j ; j ; j
total total j;
Question options:
A
B
C
D
Question points
What will be printed when the user enters for x and for yAssume there are no syntax errors and the code will compile.
int x;
int y;
System.out.printlnPlease enter a value for x: ;
x scan.nextInt;
System.out.printlnPlease enter a value for y: ;
y scan.nextInt;
while x y
x ;
System.out.print x ;
System.out.println;
Question options:
A
B
C
D
Question points
What is the value of x when the code is done executing when the user enters for x and for yAssume there are no syntax errors and the code will compile.
int x;
int y;
System.out.printlnPlease enter a value for x: ;
x scan.nextInt;
System.out.printlnPlease enter a value for y: ;
y scan.nextInt;
while x y
x ;
System.out.print x ;
System.out.println;
Question options:
A
B
C
D
Question points
What is the value of y when the code is done executing when the user enters for x and for yAssume there are no syntax errors and the code will compile.
int x;
int y;
System.out.println Enter a value for x:;
x scan.nextInt;
System.out.println Enter a value for y:;
y scan.nextInt;
while x y
x ;
System.out.print x ;
System.out.println;
Question options:
A
B
C
D
Question points
What are the values of count after the following code is executed? Assume there are no syntax errors and the code will compile.
int count ;
int num ;
do
if count
num ;
else
num ;
count;
while count ;
Question options:
A
B
C
D
Question points
What is the value of num when the loop is done? Assume there are no syntax errors and the code will compile.
int count ;
int num ;
do
if count
num ;
else
num ;
count;
while count ;
Question options:
A
B
C
D
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
