| 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 65 students
Primitive Type Assignment Errors
< Prev
Next >

Which of the following code snippets will cause a compile-time error?

I. 
int x = 5.5;

II. 
double x = 5.5; 
int y = (int) x;

III. 
double x = 5.5; 
int y = x;
A

None

B

III only

C

II only

D

I and III only

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
#1lsj0803092233 0m 36s 264
#2chunxiangxu.cxu22 1m 13s 127
#3waynechen011011 0m 00s 100
#4sailajavadlamani3311 0m 00s 100
#5l.alzahrani0411 0m 00s 100
#6liuwilliam07241011 0m 07s 93
#7varunrajaram112 0m 00s 90
#8jackgreanias36411 0m 15s 85
#9sgarv251313 0m 00s 80
#10kimtrinhqldacamle11 0m 23s 77
Items per page:
10
1 – 10 of 36

AI Tutor

How can I help?

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