Java code to create a non-element array of student marks with the size of 20.
  • double mark;
  • double [20] mark = new double;
  • double [ ] mark = new mark [20];
  • double [ ] mark = new double [20];
Java code to create a non-element array of student name with size 15.
  • String [ ] name = new String;
  • String [ ] name = new String [15];
  • name = new String [15];
  • String [15] name = new String [ ];
Java code to create an array of student id with element 115331, 450055, 555641, 875560 and 987555.
  • int [ ] id = new {115331, 450055, 555641, 875560, 987555},;
  • int [5] id = {115331, 450055, 555641, 875560, 987555},;
  • int [ ] id = {115331, 450055, 555641, 875560, 987555},;
  • int [ ] id = new int [5];
Java code to create an array of subject code with element S, M, C, P, I and K.
  • char [ ] code = {'S', 'M', 'C', 'P', 'I' and 'K'},;
  • char [ ] code = {S, M, C, P, I, K},;
  • char [ ] code = {"S", "M", "C", "P", "I", "K"},;
  • char [ ] code = {'S', 'M', 'C', 'P', 'I', 'K'},;
Java code to display the size of an array name studentname[ ].
  • System.out.println("The size is " + studentname[ index ]);
  • System.out.println("The size is " + studentname.length);
  • System.out.println("The size is " + length.length);
  • System.out.println("The size is " + studentname);
Based on the code segment below:- identify the name of the array.for(int j=0; j
  • No answer.
  • temp[ ]
  • balance
  • balance [ i ]
What are the legal indexes for the array ar, given the following declaration:int[] ar = {2, 4, 6, 8 },
  •  0, 1, 2, 3
  •  1, 2, 3, 4
  • 2, 4, 6, 8
  •  0, 2, 4, 6
_________________ is a collection of elements used to store the same type of data.
  • Array
  • Switch
  • Case
  • Loop
int [] nums = {2, 3, 5, 8, 9, 11},;How would you access the fourth element in nums?
  • nums[4]
  • nums[3]
  • nums(4)
  • nums(3)
for(int i=0; i<10; i++)           numbers[i] = 2 * i + 1;// Which index of the array holds the value of 5?
  • 1
  • 2
  • 3
  • 4
What is the error in the following code fragment?float average [20];average[20] = 15.25;
  • A cast is required
  • data not initialized
  • A two-dimensional array is required
  • Array Out-of-bounds error
 Which of the following is a two-dimensional array?
  • array anarray[2020];
  • int anarray[2020];
  • int array[20, 20];
  • char array[20];
Given the following method, what would test return if a = {0, 2, 3, 4}, and v = 1?
cs-2 sb-1-Arrayimg_no 129.jpg
  • -1
  • 0
  • 1
  • 2
How many grandmas are there? 
cs-2 sb-1-Arrayimg_no 130.jpg
  • 12
  • 13
  • 16
0:0:1



Answered

Not Answered

Not Visited
Correct : 0
Incorrect : 0