| 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 56 students
Integer Arithmetic and Operator Precedence
< Prev
Next >

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

int a = 2 + 3 * 4;
int b = (a - 5) / 3;
int c = a % b;
double d = a + b + c;
A

19.0

B

23.0

C

17.0

D

21.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
#1znasibli111 0m 00s 100
#2varunrajaram111 0m 00s 100
#3sgarv251311 0m 00s 100
#4waynechen011011 0m 00s 100
#5l.alzahrani0411 0m 00s 100
#6sailajavadlamani3313 0m 00s 80
#7kshiva2009m11 0m 35s 65
#8parth.taur22711 0m 38s 62
#9psak1211 0m 42s 58
#10mattaana00011 0m 43s 57
Items per page:
10
1 – 10 of 32

AI Tutor

How can I help?

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