πŸ“š

Β >Β 

πŸ’»Β 

Β >Β 

βž•

1.6 Multiple Choice Questions

3 min readβ€’december 26, 2021

Dalia Savy

Dalia Savy


AP Computer Science AΒ πŸ’»

130Β resources
See Units

Multiple Choice Practice for Primitive Types

Welcome to Unit 1 AP Comp Sci 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 1 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 1 here: Intro to Unit 1
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-tUsR64uzCTZB.png?alt=media&token=000223ba-f9f5-4fd2-8015-0e1456d82208

Image courtesy of Β Android Authority

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 College Board 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. Which of the following is not an example of hardware?
A. keyboard
B. operating system
C. monitor
D. chips

2. Programs and data are an example of which of the following:
A. CPU
B. hardware
C. ROM
D. software

3.Β  Which of the following is not an example of a secondary memory device?
A. Tapes
B. writable CD
C. RAM
D. floppy disk

4. Which of the following is not a function of an operating system?
A. provides the user interface with the computer
B. control all machine activity
C. give results for logical expressions
D. manages resources including CPU and memory

5. Which of the following is not an example of a browser?
A. monitor
B. text
C. executable program
D. graphics

6. Which kind of error is found by running the program and observing its behavior?
A. run-time error
B. compile-time error
C. logic error
D. syntax error

7. Assume that a and b have been defined and initialized as int values. The expression ! ( ! (a != b) && (b > 7) is equivalent to which of the following?
A. (a == b) || (b <= 7)
B. (a != b) && (b <= 7)
C. (a != b) || (b < 7)
D. (a != b) || (b <= 7)

8. Assume that the array has been defined & initialized as follows:
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-ylNkDsUlVK9j.png?alt=media&token=3081786f-4740-447c-bb41-bc7920eaa885

9. Which of the following replacements for /* missing code */ will cause the code segment to print only the values 1 3 5?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-P6doeboMm7oP.png?alt=media&token=a46947b0-d0a9-4b41-9c77-1c5ef7371f1c
A. I only
B. I and III only
C. I and II only
D. I, II, and III

10. Assume that x & y are declared and initialized as int values. Consider the following expression below. Which of the following is equivalent to the given expression?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-HUqIs2aI3UwW.png?alt=media&token=8ae2dd5f-a877-4d2b-b919-e7b715679ec5

11. Given the following code segment, what are the values of var1 & var2 after the loop finishes?
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-9S5BaGhPWJNq.png?alt=media&token=bcc2b4cd-c357-42e2-abb1-41485873463a
A. var1=3, var2=-1
B. var1=0, var2=2
C. var1=1, var2=1
D. var1=2, var2=0

12. Given the following code segment, which of the following is this equivalent to?Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-OMWH1gZjSXAm.png?alt=media&token=ae2fe045-2dd3-433d-8bd6-1955c0ea51eb
A. if (x < 0) x=0; else x=-1
B. if (x > 0) x=-x; else x=0;
C. if (x > 0) x=0;
D. x=0;

13. Which of the following expressions is equivalent to ! (c || d)
A. (!c) && (!d)
B. (c||d)
C. (c && d)
D. (!c) || (!d)

14. Given the following code segment, what are the values of a and b after the loop finishes?Β 
https://firebasestorage.googleapis.com/v0/b/fiveable-92889.appspot.com/o/images%2F-oIRtH99I6mGJ.png?alt=media&token=32793154-bc9d-4682-a9c1-255ae999e6e9
A. a=0, b=13
B. a=13, b=0
C. a=6, b=7
D. a=6, b=0

15. What data type should be used to represent the average grade for a course?
A. Boolean
B. int
C. string
D. double

πŸ™ŒTime to Check Your Answers on Unit 1 Practice Questions Answers and Review!Β 
🀝Connect with other students studying AP Comp Sci A with Hours
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
πŸ–±Unit 10 – Recursion
πŸ™Exam Reviews

Fiveable
Fiveable
Home
Stay Connected

Β© 2023 Fiveable Inc. All rights reserved.


Β© 2023 Fiveable Inc. All rights reserved.