| preferred AP College board partner for AP classes
AP Computer Science A/Unit 1: Primitive Types
Start Practice TestPractice Test
About Exam
medium Solved by 13 students
Primitive Type Arithmetic Operations
< Prev
Next >

What is the value of result after the following code segment is executed?

int x = 8 / 3;
int y = 8 % 3;
int z = x * y + y;
double result = z - x / 2.0;
A

7.0

B

5.0

C

9.0

D

6.0

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1thewrizzler611 0m 00s 100
#2jeonsaw172311 0m 21s 79
#3patrickmeijer00911 1m 08s 32
#4parth.taur22711 1m 23s 17
#5nael.elbatji01 0m 00s -10
#6anthonygraves15701 0m 41s -51
#7bommasam00011 4m 04s -144
#8lsj0803092211 13m 31s -711
Items per page:
10
1 – 8 of 8

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy