Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. 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" }
Correct Answer is : [1, 2, 3, 4].
2. 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
Correct Answer is : Not equal
3. 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
Correct Answer is : Not equal
4. 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]]
if array1==array2
print "Equal"
else
print "Not equal"
end
Correct Answer is : Equal
5. 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]]
if array1==array2
print "Equal"
else
print "Not equal"
end
Correct Answer is : Equal
6. 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