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 1Image 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:
9. Which of the following replacements for /* missing code */ will cause the code segment to print only the values 1 3 5?
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?
11. Given the following code segment, what are the values of var1 & var2 after the loop finishes?
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?Β
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?Β
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
π€Connect with other students studying AP Comp Sci A with
Hours