| 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 31 students
Integer Division and Type Promotion
< Prev
Next >

What is printed when the following code segment is executed?

int a = 5;
int b = 2;
double c = 3.0;
System.out.println(5 + a / b * c - 1);
A

10.0

B

11.5

C

9.0

D

0.666666666666667

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
#1songqiuhui201211 0m 05s 95
#2701704611 0m 26s 74
#3leftoverjluck11 0m 40s 60
#4patrickmeijer00911 0m 42s 58
#5kazvin.tjakradinata11 0m 44s 56
#6y.seong202711 1m 11s 29
#7isaact.taylor5211 1m 16s 24
#8ngvandangthanh01 0m 00s -10
#9parth.taur22712 2m 46s -76
#1010818526511 3m 47s -127
Items per page:
10
1 – 10 of 14
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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