Question 1 of 25
Hints left: 3
Q1
What is the output of the given code? array1 = [[1,2,3,4],[0,0,0,0]] array2 = [[1,2,3,4],[0,0,0,0]] print array1*array2
-
A
-
B
-
C
-
D
Q2
What is the output of the given code? array1 = [[1,2,3,4],[0,0,0,0]] array2 = [[1,2,3],[0,0,0]] print array1 && array2
-
A
-
B
-
C
-
D
Q3
What is the output of the given code? array1 = [[1,2,3,4,5],[0,0,0,0]] array2 = [[1,2,3],[0,0,0]] print !array1
-
A
-
B
-
C
-
D
Q4
What is the output of the given code? a=["hey", "ruby", "language"] b=["hey", "ruby", "language"] if a==b print "Equal" else print "Not equal" end
Q5
What is the output of the given code? a=[1,2,3,4,5] b=[1,2,4,6,8] if a[3]==b[2] print "Equal" end
Q6
What will be the output of the following? array1 = [100, 200, 300, 400, 500] array2 = [1,2,3,4,5] if array1 == array2 print "They are equal" else print "Not equal" end
Q7
What is the output of the given code? a=[1,2,3,4,5] b=[1,2,4,6,8] if a[3]==b[2] print "Equal" end
Q8
What will be the output of the following? array1 = [0,0,0] array2 = [0,0,0] if array1 == array2 print "They are equal" else print "Not equal" end
Q9
What is the output of the given code? array1 = [[1,2,3,4],[0,0,0,0]] array2 = [[1,2,3],[0,0,0,0]] if array1==array2 print "Equal" else print "Not equal" end
Q10
What is the output of the given code? a=[1,2,3,4,5] b=[1,2,3,4,5] if a==b print "Equal" else print "Not equal" end
Q11
What will be the output of the following? array = [100, 200, 300, 400, 500] print array[4]
Q12
What is the output of the given code? array1 = [[1,2,3,4],[0,0,0,0]] array2 = [[1,2,3,4],[0,0,0,0]] print array1-array2
-
A
-
B
-
C
-
D
Q13
What is the output of the given code? string_array = ["a","e","i","o","u"] print string_array[3]
Q14
What is the output of the given code? string_array = ["a","e","i","o","u"] boolean_array = ["True","False"] puts string_array[3] puts boolean_array
Q15
What is the output of the given code? multi_d_array = [[1,2,3,4],[0,0,0,0]] multi_d_array.each { |x| puts "#{x}\n" }
-
A
-
B
-
C
-
D
Q16
What is the output of the given code? a=[["a","b"]] b=[["e","a"]] print a + b
Q17
What is the output of the given code? array1 = [[1,2,3,4],[0,0,0,0]] array2 = [[1,2,3,4],[0,0,0,0]] print array1+array2
-
A
-
B
-
C
-
D
Q18
What will be output of the given code? my_array = [1, 2, 3, 4] print my_array
Q19
What is the output of the given code? a=["hey", "ruby", "language"] b=["hey", "ruby", "language"] if a==b print "Equal" else print "Not equal" end
Q20
It is possible to make array of booleans.
Q21
What is the output of the given code? a=["hey", "ruby", "language"] b=["hey", "language", "ruby"] if a==b print "Equal" else print "Not equal" end
Q22
What will be the output of the following? array = [100, 200, 300, 400, 500] print "array[5]"
Q23
What will be the output of the following? array1 = [1,2,3] array2 = [0,0,0] if array1 == array2 print "Equal" else print "Not equal" end
Q24
What is the output of the given code? a=[1,2,3,4,5] b=[1,2,3,4,5] if a==b print "Equal" else print "Not equal" end
Q25
It is possible to make array of booleans.