Computer Applications
Differentiate between the following:
Array Declaration and Initialisation
Java Arrays
36 Likes
Answer
Array declaration tells the compiler about the size and data type of the array so that the compiler can reserve the required memory for the array. This reserved memory is still empty. Array Initialisation assigns values to the array elements i.e. it stores values in the memory reserved for the array elements.
Answered By
20 Likes
Related Questions
Which element is num[9] of the array num?
Write a program to initialise the given data in an array and find the minimum and maximum values along with the sum of the given elements.
Numbers: 2, 5, 4, 1, 3
Output:
Minimum value: 1
Maximum value: 5
Sum of the elements: 15Differentiate between the following:
int a[10] and char a[10]
Differentiate between Sorting and Searching