Question Bank · Unit 2
AP® Computer Science A Selection and Iteration Practice Questions
Work through AP Computer Science A practice questions on Selection and Iteration, then check each answer against a worked solution.
Free · no sign-up
Open questions need no account. Sign up or log in to open the rest.
All 740
Multiple choice 692
Free response 48
Which offered int value of stop makes the final code equal to 120? int…
Sign up now. It's free!
See the full question with its answer and worked solution.
For every int n from 0 through 8 inclusive, total should equal 1*2 + 2*3 + ... + n*(n+1), with result 0…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { int product = 1; for (int…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { for (int…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { int x = row; for…
Sign up now. It's free!
See the full question with its answer and worked solution.
For every int n from 0 through 8 inclusive, which statement in the replacement loop preserves the final total? Each version starts with total = 0. // Original…
Sign up now. It's free!
See the full question with its answer and worked solution.
For every int n from 1 through 8 inclusive, which expression equals the final count? int count = 0; for (int…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed? int total = 0; for (int row = 1; row <= 3; row++) { for (int col = 1; col <=…
Sign up now. It's free!
See the full question with its answer and worked solution.
Version II moves only limit -= row to the start of the outer body, before the inner loop. Each version starts with count = 0 and limit = 5. What are the final…
Sign up now. It's free!
See the full question with its answer and worked solution.
Which output is produced? Spaces inside a line are significant. for (int row = 0; row < 3; row++) { for (int col = 0; col < 5; col++) {…
Sign up now. It's free!
See the full question with its answer and worked solution.
Page 69 of 74
Get your FRQs graded in the Student Portal
In the Verityprep Student Portal, answer the FRQs of AP practice and past exams by typing or uploading a photo. A teacher grades them with that year's official College Board scoring guidelines and gives you an estimated 1–5 score.
Join Verityprep now
AP® and Advanced Placement® are registered trademarks of the College Board, which is not affiliated with, and does not endorse, Verityprep. Names are used for identification purposes only.