Q. Program to print the elements of an array in reverse order.ExplanationIn this program, we need to print the elements of the array in reverse order that is; the last element should be displayed first, followed by second last element and so on. Above array in reversed order: Algorithm
SolutionPythonOutput: Original array: 1 2 3 4 5 Array in reverse order: 5 4 3 2 1 COutput: Original array: 1 2 3 4 5 Array in reverse order: 5 4 3 2 1 JAVAOutput: Original array: 1 2 3 4 5 Array in reverse order: 5 4 3 2 1 C#Output: Original array: 1 2 3 4 5 Array in reverse order: 5 4 3 2 1 PHPOutput: Original array: 1 2 3 4 5 Array in reverse order: 5 4 3 2 1 Next Topic# |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India