Question: Data (and return variable): int []array A = (1, 2, 3, 4, 5): int [] array B = (6, 4, 7, 3, 1, 8): int
Data (and return variable): int []array A = (1, 2, 3, 4, 5): int [] array B = (6, 4, 7, 3, 1, 8): int [] array C=(3, 7, 8, 9, 1, 6): int [] result: Sample code that makes calls to reversed: result - reverse It(array A): System, out printin ("array A reversed: "): Show Array (result): System. Out. Printin(): result=reverse It (array B): System. out. print In (" array B reversed: "): Show Array (result); System. Out. Print In (): result = reverse It (result); System. Out. Print In (" result reversed back to original array B: "): Show Array (result): System. Out. Print In (); result = reverse It (array C) System. Out. Print In (" array C reversed: "); Show Array (result It); Run of above code: array A reversed: 5 4 3 2 1 array B reversed: 8 1 3 7 4 6 result reversed back to original array B: 6 4 7 3 1 8 array C reversed: 6 1 9 8 7 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
