| preferred AP College board partner for AP classes
AP Computer Science A/Unit 6: Array
Start Practice TestPractice Test
About Exam
hard Solved by 4 students
Array Indexing with Pre-Increment
< Prev
Next >

What is the output of the program?

public class ComplexIndex {
    public static void main(String[] args) {
        int[] values = {3, 6, 9, 12};
        int index = 1;
        values[index] = values[index] + values[++index];
        System.out.println(values[1]);
    }
}
A

18

B

15

C

9

D

12

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
#1lightingstrikes134222 0m 00s 200
#2j4949794911 0m 00s 100
#3demosolasis101 0m 56s -66
Items per page:
10
1 – 3 of 3
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy