Expressions and Output FRQ Practice

Responses receive AI feedback against a rubric after submission. Scores are practice estimates.

Question 1 of 5

State the exact console text produced by the fragment, ignoring a final trailing newline. Explain how print and println control the line breaks. Then rewrite the fragment so Lane, End, and Next each appear on their own line.

System.out.print("Lane");
System.out.println("End");
System.out.print("Next");

Question 2 of 5

State the exact console text produced by the fragment, including any blank line, and ignore a final trailing newline. Explain the role of the empty println. Then rewrite the fragment so it displays Start Finish on a single line with exactly one space.

System.out.println("Start");
System.out.println();
System.out.print("Finish");

Question 3 of 5

Write one Java print statement that displays exactly this text, including the quotation marks and the backslash: path: "C:\bin"

Then explain which escape sequences are required and why the surrounding source-code quotation marks do not appear in the output.

Question 4 of 5

Evaluate each expression in the table. Then explain the Java arithmetic rule that accounts for the three results.

Expression
13 / 5
13 % 5
13 / 5.0

Question 5 of 5

Evaluate 4 + 18 / 5 and 18 / (4 + 5). Show the order of operations for each. Then explain what happens if the program evaluates the int expression 18 / 0.