Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 29 pages
Exam (elaborations)

AP COMPUTER SCIENCE SEMESTER 1 FINAL PRACTICE EXAMINATION 2026 QUESTIONS WITH ANSWERS GRADED A+

Document preview thumbnail
Preview 3 out of 29 pages

AP COMPUTER SCIENCE SEMESTER 1 FINAL PRACTICE EXAMINATION 2026 QUESTIONS WITH ANSWERS GRADED A+

Content preview

AP COMPUTER SCIENCE SEMESTER 1
FINAL PRACTICE EXAMINATION 2026
QUESTIONS WITH ANSWERS GRADED
A+

◍ Which is the hexadecimal representation of the binary number 0010 110
1011 1111?.
Answer: 2CBFEach 4 digit binary number translates to a single hexadecimal
digit. Any value higher than 9 will result in an uppercase letter starting from
A.
◍ What are the binary numbers up to the 8th place value?.
Answer: 128 64 32 16 8 4 2 1You can solve this for any amount of place
values by using the equation 2^n, where n is the place value. You start with
0 and work your way up to the last place value. This works for other bases
such as base 4 as well, just replace the 2 with the new base number.
◍ Consider the following code segment.System.out.print("Hello
System.out.println");System.out.print("!!!");What is printed as a result of
executing the code segment?A) Hello!!!B) Hello System.out.println!!!C)
Hello !!!D) Hello System.out.println !!!E) Nothing is printed because the
text "System.out.println" cannot appear inside a print statement..
Answer: B) Hello System.out.println!!!
◍ Consider the following code segment.int x = 5;int y = 6;/* missing code */z
= (x + y) / 2;Which of the following can be used to replace /* missing code
*/ so that the code segment will compile?
I. int z = 0;I
I. int z;II
I. boolean z = false;A) I onlyB) II onlyC) I and II onlyD) II and III onlyE) I,

, II, and III.
Answer: C) I and II only
◍ Consider the following code
segment.System.out.print("*");System.out.println("**");System.out.println("***");Sy
is printed as a result of executing the code
segment?A)**********B)**********C)**********D)**********E)**********.
Answer: D)**********
◍ What is the output of the following program
statement?System.out.println("Total: " + 8 + 3);.
Answer: Total: 83Because the statement starts with a String, the numbers
are simply concatenated, not added together.
◍ Which of the following expressions evaluate to 7 ?
I. 9 + 10 % 12I
I. (9 + 10) % 12II
I. 9 – 2 % 12A) I onlyB) II onlyC) I and IIID) II and IIIE) I, II, and III.
Answer: D) II and III
◍ Consider the following code segment.double num = 9 /
4;System.out.print(num);System.out.print(" ");System.out.print((int)
num);What is printed as a result of executing the code segment?A) 2 2B) 2.0
2C) 2.0 2.0D) 2.25 2E) 2.25 2.0.
Answer: B) 2.0 2
◍ Consider the following code segment.int a = 5;int b = 8;int c =
3;System.out.println(a + b / c * 2);What is printed as a result of executing
this code?A) 2B) 6C) 8D) 9E) 14.
Answer: D) 9
◍ How many different values can be represented in 7 bits?.
Answer: 128You can figure this out for any amount of bits by the equations
2^n, where n is the number of bits.
◍ Consider the following code segment.double x = (int) (5.5 - 2.5);double y =
(int) 5.5 - 2.5;System.out.println(x - y);What is printed as a result of

, executing the code segment?A) -1.0B) -0.5C) 0.0D) 0.5E) 1.0.
Answer: D) 0.5
◍ What is the decimal (base 10) value of the base 4 number 123?.
Answer: 27Base 4 place values can be found similarly to binary, where you
use 4^n and then solve the number, which would be 1*16 + 24 + 3*1 = 27.
◍ Java is platform independent because of the....
Answer: JVM.
◍ Consider the following code segment.int x = 5;x += 6 * 2;x -= ;What
value is stored in x after the code segment executes?A) -1.5B) 1C) 9D)
15.5E) 16.
Answer: E) 16
◍ What is a JVM?.
Answer: A Java Virtual Machine. Each platform has its own JVM that
translates bytecode for that platform.
◍ Consider the following code segment.System.out.print(*); // Line
1System.out.print("*"); // Line 2System.out.println( ); // Line
3System.out.println("*"); // Line 4The code segment is intended to produce
the following output, but may not work as intended.***Which line of code,
if any, causes an error?A) Line 1B) Line 2C) Line 3D) Line 4E) The code
segment works as intended..
Answer: A) Line 1
◍ Which of the following expressions evaluate to 3.5 ?
I. (double) + 3I
I. (double) () + 3II
I. (double) ( + 3)A) I onlyB) III onlyC) I and II onlyD) II and III onlyE)
I, II, and III.
Answer: A) I only
◍ What kind error occurs when you use the wrong formula to calculate the
area of a circle?.
Answer: Logic error. This is because the machine compiles and has a valid

Document information

Uploaded on
May 24, 2026
Number of pages
29
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TopGradeInsider
4.2
(12)
Sold
144
Followers
1
Items
51340
Last sold
3 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions