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

What is printed as a result of executing the following code segment?

public class ReversePrint {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        for (int i = arr.length - 1; i >= 0; i--) {
            System.out.print(arr[i]);
        }
    }
}
A

5432

B

12345

C

54321

D

15243

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
#1bommasam00055 2m 46s 334
#2winstonhou110711 0m 15s 85
#33000666111 0m 18s 82
#4tfvhygdj11 0m 25s 75
#5kazvin.tjakradinata11 0m 30s 70
#6kshiva2009m11 0m 31s 69
#7vempaami00011 0m 31s 69
#8singhris00011 0m 35s 65
#9sathilak00011 0m 39s 61
#10y.seong202712 0m 39s 51
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