exam questions

Exam 1z0-808 All Questions

View all questions & answers for the 1z0-808 exam

Exam 1z0-808 topic 1 question 57 discussion

Actual exam question from Oracle's 1z0-808
Question #: 57
Topic #: 1
[All 1z0-808 Questions]

Given the code fragment:

Which option represents the state of the num array after successful completion of the outer loop?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: A

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Vicky_65
3 months, 2 weeks ago
A is correct. Array would be initialize as {{10,10,10}}
upvoted 1 times
...
Ankit1010
5 months, 1 week ago
A is the correct answer
upvoted 2 times
...
Hirushi
5 months, 3 weeks ago
Obvious
upvoted 1 times
...
carloswork
9 months ago
Tested. Answer is A. public class Test { public static void main(String[] args) { int num[][] = new int[1][3]; for(int i = 0 ; i < num.length ; i++) { for(int j = 0; j < num[i].length ; j++) { num[i][j] = 10; } } for(int i = 0 ; i < num.length ; i++) { for(int j = 0; j < num[i].length ; j++) { System.out.printf("\n num[%d][%d]="+num[i][j],i,j); } } } }
upvoted 1 times
...
kkaayyyy
9 months, 1 week ago
Correct Answer is A
upvoted 1 times
...
iSnover
9 months, 2 weeks ago
The correct one is the letter A, remember that when instantiating a matrix, the first [] represents the rows and the second [] represents the column, that is, [1][3] means a matrix of one row and 3 columns. and following the for logic of the question, it will print the answer of the letter A.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago