MCQExams
0:0:1
CBSE
JEE
NTSE
NEET
Practice
Homework
×
Computer Science
Array
Java code to create a non-element array of student marks with the size of 20.
Report Question
0%
double mark;
0%
double [20] mark = new double;
0%
double [ ] mark = new mark [20];
0%
double [ ] mark = new double [20];
Java code to create a non-element array of student name with size 15.
Report Question
0%
String [ ] name = new String;
0%
String [ ] name = new String [15];
0%
name = new String [15];
0%
String [15] name = new String [ ];
Java code to create an array of student id with element 115331, 450055, 555641, 875560 and 987555.
Report Question
0%
int [ ] id = new {115331, 450055, 555641, 875560, 987555},;
0%
int [5] id = {115331, 450055, 555641, 875560, 987555},;
0%
int [ ] id = {115331, 450055, 555641, 875560, 987555},;
0%
int [ ] id = new int [5];
Java code to create an array of subject code with element S, M, C, P, I and K.
Report Question
0%
char [ ] code = {'S', 'M', 'C', 'P', 'I' and 'K'},;
0%
char [ ] code = {S, M, C, P, I, K},;
0%
char [ ] code = {"S", "M", "C", "P", "I", "K"},;
0%
char [ ] code = {'S', 'M', 'C', 'P', 'I', 'K'},;
Java code to display the size of an array name studentname[ ].
Report Question
0%
System.out.println("The size is " + studentname[ index ]);
0%
System.out.println("The size is " + studentname.length);
0%
System.out.println("The size is " + length.length);
0%
System.out.println("The size is " + studentname);
Based on the code segment below:- identify the name of the array.for(int j=0; j
Report Question
0%
No answer.
0%
temp[ ]
0%
balance
0%
balance [ i ]
What are the legal indexes for the array ar, given the following declaration:int[] ar = {2, 4, 6, 8 },
Report Question
0%
0, 1, 2, 3
0%
1, 2, 3, 4
0%
2, 4, 6, 8
0%
0, 2, 4, 6
_________________ is a collection of elements used to store the same type of data.
Report Question
0%
Array
0%
Switch
0%
Case
0%
Loop
int [] nums = {2, 3, 5, 8, 9, 11},;How would you access the fourth element in nums?
Report Question
0%
nums[4]
0%
nums[3]
0%
nums(4)
0%
nums(3)
for(int i=0; i<10; i++) numbers[i] = 2 * i + 1;// Which index of the array holds the value of 5?
Report Question
0%
1
0%
2
0%
3
0%
4
What is the error in the following code fragment?float average [20];average[20] = 15.25;
Report Question
0%
A cast is required
0%
data not initialized
0%
A two-dimensional array is required
0%
Array Out-of-bounds error
Which of the following is a two-dimensional array?
Report Question
0%
array anarray[2020];
0%
int anarray[2020];
0%
int array[20, 20];
0%
char array[20];
Given the following method, what would test return if a = {0, 2, 3, 4}, and v = 1?
Report Question
0%
-1
0%
0
0%
1
0%
2
How many grandmas are there?
Report Question
0%
12
0%
13
0%
16
0:0:1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
Answered
0
Not Answered
0
Not Visited
Correct : 0
Incorrect : 0
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqexams.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page