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
What is printed as a result of executing the following code segment? int n = 1; boolean found =…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? int a =…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? int a = 1, b = 1, c…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? int count = 0; for…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? for (int i = 1; i <= 4; i++) {…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? int i =…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? for (int i = 3; i >= 1; i--) { for (int j = 0; j…
Sign up now. It's free!
See the full question with its answer and worked solution.
What is printed as a result of executing the following code segment? int max = 0; for (int i…
Sign up now. It's free!
See the full question with its answer and worked solution.
For every int n from 0 through 6 inclusive, which statement in the replacement loop preserves the final value of sum? Each version starts with int sum = 0;. //…
Sign up now. It's free!
See the full question with its answer and worked solution.
Each version begins with int a = 3; and int b = 2;. For every int n from 0 through 8 inclusive, which replacement body preserves…
Sign up now. It's free!
See the full question with its answer and worked solution.
Page 73 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.