πŸ“š

Β >Β 

πŸ’»Β 

Β >Β 

πŸ–±

10.3 Multiple Choice Questions

3 min readβ€’december 26, 2021


AP Computer Science AΒ πŸ’»

130Β resources
See Units

Multiple Choice Practice for Recursion

Welcome to Unit 10 AP Computer Science A Multiple Choice Questions! Grab some paper and a pencil πŸ“„ to record your answers as you go. You can see how you did on the Unit 10 Practice Questions Answers and Review sheet once you're done. Don't worry, we have tons of resources available if you get stumped πŸ˜• on a question. And if solo study is not your thing, join a group in Hours!
Not ready to take a quiz yet? Start studying unit 10 Here: Intro to Unit 10
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-xp7nhLeuKFy0.jpeg?alt=media&token=98ed1621-7eba-4a95-84b0-c8036ab679ac

Image From Wikipedia.

Facts about the test: The AP Computer Science A exam has 40 multiple choice questions and you will be given 90 minutes to complete the section. That means it should take you around 34 minutes to complete 15 questions.

*The following questions were not written by CollegeBoard and although they cover information outlined in the AP Computer Science A Course and Exam Description the formatting on the exam may be different.


1. What are the main aspects of a recursive method?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-xnGe4qSsSLl6.png?alt=media&token=aa23a5b4-b33e-4777-8aa0-18a1d06c42df
A.Β I
B.Β II
C.Β I, II
D.Β II, III

2. Which of these is the correct way a recursive method should call itself (Given the code below)?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-ztw5SIumKTUk.png?alt=media&token=1b7eda64-87f8-4b9e-b88d-685d4a626d47
A.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-P4YPPiEEn3NO.png?alt=media&token=b1707606-8a56-4f3e-b3a3-3fe849676fef
B.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-aQjJrM2BZwv7.png?alt=media&token=290404ec-2159-4396-9450-6a6ba037390d
C.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-aWG3JbWJRY6O.png?alt=media&token=38cd7084-a8a4-4d4f-9c68-04ed4515a55b
D.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-c4w5DJnJKOfw.png?alt=media&token=94d9470d-c961-4d70-9a9a-1ee1184d7f42

3. Which method is not recursive?
A.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-Fvq8Td4x7V0t.png?alt=media&token=36f31058-ae37-4211-be68-8df2cfece107
B.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-NXrLjPUWIyJu.png?alt=media&token=7441e20b-baca-431d-a32e-4ee7bcc44e6a
C.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-iXInK69trg1U.png?alt=media&token=4b2af59f-7d37-4a8c-94cc-a375f19714e2
D.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-YdgQbvgGhkF3.png?alt=media&token=a4a86339-df9b-4afd-8413-ec3180663941

4. Given the recursive method below, what will be printed out if the method is called: printing(492); ?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-8prjAEDPIl5I.png?alt=media&token=57842016-20ff-4b22-952f-5df839d740e2
A. 492
B. 984
C. 984984
D. 9849849

5. Given the recursive method below, what will be returned out if the method is called in findNumberX("xjxfeixx"); ?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-flxuo1B3Zqp8.png?alt=media&token=58efb177-7039-4474-a882-766db2cd0553
A. 0
B. 3
C. 4
D. 5

6. ​​How does binary search work?
A. Binary search sorts an array by dividing the given list in half, and repeating that process until it finds the target value.
B. Binary search sorts an array by checking every value in the list until it reaches the target value.
C. Binary search sorts an array by comparing a value to the already sored values and shifting it to fit it in where it belongs.
D. Binary search sorts an array by moving items in an unsorted list into a sorted list one at a time and swapping numbers one at a time with elements in the sorted list.

7. Which type of sort is usually the quickest?
A. Selection Sort
B. Merge Sort
C. Insertion Sort
D. Linear Search

8. Which of these recursion methods results in an infinite recursion if the value of a passed in to all of them is -1?
A.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-mOHshVUkHejs.png?alt=media&token=bd1a4f8e-dc46-4918-b962-3bb4600dfed6
B.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-cPuMpR0tTYXA.png?alt=media&token=13b4f7f1-7308-40b9-af64-d548a160f702
C.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-uzFVR6OfSSUu.png?alt=media&token=3c9de311-6375-4cc7-a726-b7472e775591
D.Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-X9C9ZIUui7PO.png?alt=media&token=4077afc2-8cc4-456b-89c3-5dc513752a99

9. Where is the recursive call?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-W1TTXornl05X.png?alt=media&token=d5963585-0b2c-42b5-851c-59c156b0b901
A. 3
B. 5
C. 6
D. 7

10. Given the recursive method below, if the value passed in is 4444, what is printed out by the method?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-LC5aHNYAs87E.png?alt=media&token=e48e0584-b14c-49e9-ae74-d7b442531b6c
A. 4444
B. 88884444
C. 8888444422221111
D. Infinite Recursion

11. Given the recursive method below, how will the method return a boolean value of true?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-V59rAzpx2eLR.png?alt=media&token=e8eb1f70-688a-4119-a76a-56d57002b2ed
A. The String str has to start with at least 3 of the same characters in a row.
B. The String str has to contain at least 3 of the same characters in a row.
C. The String str has to end with at least 3 of the same characters in a row.
D. The String str has to contain at least 3 of the same characters.

12. Given the recursive method below, what will be returned if the method is called: remainder(18); ?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-8i2FjJDI6yoo.png?alt=media&token=009bcb00-9974-4027-ac17-e862b44da98a
A. 0
B. 1
C. 2
D. 3

13. If given the following, n = 3, what is the answer?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-gncUwRsUARiq.png?alt=media&token=247f695d-6b4d-4252-9c03-1f72fa11ac39
A. 0
B. 1
C. 2
D. 3

14. What common error can recursive methods cause (not limited to recursive methods)?
A. StackOverflowError
B. IndexOutOfBoundsError
C. InterruptedException
D. RuntimeException

15. To simulate the Fibonacci sequence or factorials, what is typically used?
A. Iteration
B. Recursion
C. Loops
D. None of the Above

Time to Check Your Answers on Unit 10 Practice Questions Answers and Review! πŸ™Œ
Browse Study Guides By Unit
βž•Unit 1 – Primitive Types
πŸ“±Unit 2 – Using Objects
πŸ–₯Unit 3 – Boolean Expressions & if Statements
πŸ•ΉUnit 4 – Iteration
βš™οΈUnit 5 – Writing Classes
⌚️Unit 6 – Array
πŸ’ΎUnit 7 – ArrayList
πŸ’»Unit 8 – 2D Array
πŸ–²Unit 9 – Inheritance
πŸ™Exam Reviews