Q. Program to print the elements of an array.ExplanationIn this program, we need to create an array and print the elements present in the array. Arrays are the special variable that stores multiple values under the same name. A contiguous memory will be allocated to store elements. Elements of the array can be accessed through their indexes. Here, 1, 2, 3, 4 and 5 represent the elements of the array. These elements can be accessed through their corresponding indexes, i.e., 0, 1, 2, 3 and 4. Algorithm
SolutionPythonOutput: Elements of given array: 1 2 3 4 5 COutput: Elements of given array: 1 2 3 4 5 JAVAOutput: Elements of given array: 1 2 3 4 5 C#Output: Elements of given array: 1 2 3 4 5 PHPOutput: Elements of given array: 1 2 3 4 5 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