| preferred AP College board partner for AP classes
AP Computer Science A/Unit 6: Array
Start Practice TestPractice Test
About Exam
medium Solved by 16 students
Array Element Reassignment
< Prev
Next >

What is the output of the following code segment?

int[] arr = {1, 2, 3, 4, 5};
arr[3] = arr[1] * 3;
System.out.println(arr[3]);
A

5

B

4

C

6

D

3

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
#1midnightasdark11 0m 13s 87
#2singhris00011 0m 13s 87
#3kazvin.tjakradinata11 0m 17s 83
#4sathilak00011 0m 17s 83
#5geethasailaja23 2m 11s 59
#6sailajavadlamani3311 0m 41s 59
#7suhanakochhar00611 0m 47s 53
#8y.seong202711 0m 53s 47
#9Pelisx11 0m 59s 41
#10bommasam00033 12m 04s -424
Items per page:
10
1 – 10 of 10
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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