Select Page

7. Comment on a table of the void data type. a) It can store any type of data b) It stores only items with a data type similar to the first item c) It captures the data type with the highest accuracy d) You cannot have a void data type table Show answer Minimum number of trades required to convert table 89,19,40,14,17,12,10,2,5,7,11,6,9,70 to heap, with the maximum element at the root Type COLOGNE:(LIME, PINE, MUSK, MENTHOL); var a:array[COLOGNE]de REAL; Consider the following declaration double balance[] = {1000.0, 2.0, 3.4, 17.0, 50.0}; If you omit the array size, a table is created that is just large enough to allow initialization. So the correct option is `A`. For programming language `C` * Constant expressions are evaluated at compile time * String constants can be concatenated at compile time * Table size must be known at compile time 3. What are the different ways to initialize an array with all elements as zero? a) int array[5] = {}; b) int array[5] = {0}; (c) 6. An array of similar data types, which are themselves a collection of different data types, are _____ a) Related lists b) Trees c) Structure table d) All mentioned See response A one-dimensional array A has indexes 1….75.Each element is a string and occupies three words from memory. The array is stored decimal from position 1120. The starting address of A[49] is We recommend that you try these code snippets in the Eclipse IDE and understand how the program works (but the answer with the explanation at the end of each question is there).

These questions may be asked in interviews or similar questions may appear in interviews, so be prepared. In this article, we have provided multiple-choice questions on Java arrays to test your knowledge of arrays in Java. An element takes up three words from memory, so the location 1120, 1121, 1123 stores the first element. A[49] is stored at position 1264, (1120+(48*3)) String constants can be concatenated at compile time Only element 70 breaks the rule. Therefore, it must be moved to its correct position. Step 1: swap(10, 70) Step 2: swap(40, 70) Therefore, only 2 swaps are needed. a) 5, 5, 5, 5, 5 b) 5, 0, 0, 0, 0 c) 5, (garbage), (garbage), (garbage), (garbage), (d) (garbage), (garbage), (garbage), (garbage), (garbage), 5 Show answer.