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
18. What is the output of the given code?
a=[["a","b"]]
b=[["e","a"]]
print a + b
Correct Answer is : [[“a”, “b”], [“e”, “a”]].
19. What is the output of the given code?
a=[["a","b"]]
b=[["e","a"]]
print a + b
Correct Answer is : [[“a”, “b”], [“e”, “a”]].
20. It is possible to make array of booleans.
Correct Answer is : TRUE
Similar Interview Questions
Search for latest jobs
Get $5 added to your wallet for registering an account. Refer others and get $1 for each successful referral. Earn while you search for jobs and redeem in gift cards!