Computer Applications
What is an array? Write a statement to declare an integer array of 10 elements.
Java Arrays
ICSE 2012
10 Likes
Answer
An array is a structure to store a number of values of the same data type in contiguous memory locations. The following statement declares an integer array of 10 elements:
int arr[] = new int[10];
Answered By
5 Likes
Related Questions
Define a class to search for a value input by the user from the list of values given below. If it is found display the message "Search successful", otherwise display the message "Search element not found" using Binary search technique.
5.6, 11.5, 20.8, 35.4, 43.1, 52.4, 66.6, 78.9, 80.0, 95.5.
Define a class pin code and store the given pin codes in a single dimensional array. Sort these pin codes in ascending order using the Selection Sort technique only. Display the sorted array.
110061, 110001, 110029, 110023, 110055, 110006, 110019, 110033