Verityprep
Question Bank

AP® Computer Science A Multiple Choice Questions

Work through AP Computer Science A multiple-choice questions unit by unit, 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.

Questions 2,661–2,670 of 2,811
  1. 2661
  2. 2662
  3. 2663
  4. 2664
  5. 2665
  6. 2666
  7. 2667
  8. 2668
  9. 2669
  10. 2670

Question 2661

Multiple choice Unit 4: Data Collections
A text file contains: 6 3 8 1 5. What is printed? int min = sc.nextInt(); while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2662

Multiple choice Unit 4: Data Collections
A text file contains two lines: 10 20 30 40 What is printed? int sum = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2663

Multiple choice Unit 4: Data Collections
A text file contains: cat bat hat dog mat. What is printed? int count = 0; while (sc.hasNext()) { String s =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2664

Multiple choice Unit 4: Data Collections
A text file contains: 10 20 30. What is printed? int sum = 0; int count = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2665

Multiple choice Unit 4: Data Collections
A text file contains: 10 20 40. What is printed? int sum = 0; int count = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2666

Multiple choice Unit 4: Data Collections
A text file contains three lines: a b c d e f What is printed? int count = 0;…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2667

Multiple choice Unit 4: Data Collections
A text file contains: A B C D E. What is printed? String result = ""; int idx = 0; while (sc.hasNext()) {…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2668

Multiple choice Unit 4: Data Collections
A text file contains: 5 1 2 3 4 5. The first number indicates how many values follow. What is printed? int n =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2669

Multiple choice Unit 4: Data Collections
A text file contains: J a v a. What is printed? String result = ""; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2670

Multiple choice Unit 4: Data Collections
A text file contains: 1.5 2.5 3.0. What is printed? double sum = 0; while…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 2,661 of 2,811
Page 267 of 282