AP CSA: Unit 3 & 4
Quiz by Sayan Saha (Dunwoody High School)
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
20 questions
Show answers
- Q1This data type holds only one piece of information at a time?classprimitivealphanumericnull20s
- Q2Which of the following is not a consideration when choosing an algorithm?speedFind patternsmemory useFind patterns30s
- Q3We usually use this type of loop with arrays?for loopBoolean testwhile loopif statement30s
- Q4Adding two Strings together is called?concatenationstring additionmultiplicationparsing20s
- Q5Which of the following is the correct way to find the length of the String in the first element of an array called words?words.length()[0]words[0].length()words.length[0]words.length30s
- Q6What does the following algorithm do?Tests if the elements in the array are even or odd.Changes all the values in the array to even numbers.Doubles all the values in the array.Doubles every other value in the array30s
- Q7We usually use a ______ with arrays?while loopif statementboolean testfor loop30s
- Q8Consider the following code:double char char doubledouble char boolean algorithmalgorithm boolean char doublealgorithm boolean boolean algorithm30s
- Q9What is output by the following?Prints the first character in the StringNothing, there is an index out of bounds error.Prints the last character in the StringNone of the items listed.30s
- Q10What is 55 in binary?0 0 1 1 0 1 0 10 0 1 1 0 1 1 00 0 1 1 0 1 1 10 0 1 1 0 0 1 130s
- Q11When you pass an array to a method, the method receives ______?A copy of the arrayThe length of the arrayThe reference to the arrayNone of the items listed30s
- Q12When this type of variable is passed into a method, any changes made to it in the method are saved and the previous value of the variable is overwritten outside the method?methodclassprimitiveargument30s
- Q13Consider the code: What is output by the following call? mystery(9);0123456712345678900123456780012345630s
- Q14What operator do you use to find the remainder?Math.pow/*%30s
- Q15A recursive method must have a recursive call and a ______?null casebase casestop casevoid case30s