What is the output of the given code? a=5 b=15 while b>a puts a*(b-a) while a>b a+=1 b-=1 end end
1. 5..15
2.50
3. Infinite loop
4.5 50
Posted Date:-2022-02-07 09:49:34
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
1.[[1, 2, 3], [0, 0, 0]].
2.[[1, 2, 3, 4, 5], [0, 0, 0, 0]].
3.False
4.Error
Posted Date:-2022-02-07 10:57:51
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 || array2
1.[[1, 2, 3], [0, 0, 0]].
2.[[1, 2, 3, 4, 5], [0, 0, 0, 0]].
3. [].
4.Error
Posted Date:-2022-02-07 10:50:01
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
1. [[1, 2, 3, 4], [0, 0, 0, 0]].
2.[[1, 2, 3, 4], [0, 0, 0, 0], [1, 2, 3, 4], [0, 0, 0, 0]].
3.[].
4.None of the mentioned
Posted Date:-2022-02-07 10:45:57
What is the output of the given code? for num in 1...5 puts num end
1.1 2 3 4 5
2.1 2 3 4
3.2 3 4 5
4.None of the mentioned
Posted Date:-2022-02-07 10:10:07
What is the output of the given code? i = 50 while i > 25 do print 50/i i -= 1 end
1.50..25
2.50..1
3.Infinite loop
4.1111111111111111111111111
Posted Date:-2022-02-07 09:58:34
What is the output of the given code? i = 50 j=55 while i > 25 && j>35 do puts 50*j/i i -= 1 j-=2 end
1.25 35
2.50 55
3.Infinite loop
4.55 54 53 52 51 50 48 47 46 45
Posted Date:-2022-02-07 10:03:30
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[1]
1. [“a”,”e”,”i”,”o”,”u”].
2.Error
3.o False
4.None of the mentioned
Posted Date:-2022-02-07 10:27:39
What will be the output of the following? array = [100, 200, 300, 400, 500] print array[5]
1.400
2.500
3.Nil
4.None of the mentioned
Posted Date:-2022-02-07 10:15:11
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"
end1.They are equal
2.NilNot equal
3.Nil
4.None of the mentioned
Posted Date:-2022-02-07 10:18:51
What is the output of the given code? a = 5 b=10 while a<b do puts a*b a+=2 b-=2 end
1. 5 10
2.50 56
3.Infinite loop
4.5 6 7 8 9 10
Posted Date:-2022-02-07 10:01:49
What is the output of the given code? a=[["a","b"]] b=[["e","a"]] print a + b
1.[[“a”, “b”], [“e”, “a”]].
2.[[“2a”, “b”], [“e”]].
3.False
4. Error
Posted Date:-2022-02-07 10:59:37
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"
end1.Equal
2.Error
3.Not equal
4.None of the mentioned
Posted Date:-2022-02-07 10:35:10
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"
end1.Equal
2.Error
3.Not equal
4.None of the mentioned
Posted Date:-2022-02-07 10:32:54
What is the output of the given code? a=["hey", "ruby", "language"] b=[1, 2, 3] puts b[1] puts a[2]
1.3 ruby
2.b) Error c)
3.2 language
4.None of the mentioned
Posted Date:-2022-02-07 10:36:40
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"
end1.Equal
2.Error
3.Not equal
4.None of the mentioned
Posted Date:-2022-02-07 10:31:31
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"
end1.Equal
2.Error
3.4
4.None of the mentioned
Posted Date:-2022-02-07 10:30:19
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"
end1.[“a”,”e”,”i”,”o”,”u”]. b) c)
2.Error
3.o False
4.None of the mentioned
Posted Date:-2022-02-07 11:27:08
What is the output of the given code? a=5 b=15 while a&&b puts a+b end
1.5..15
2.20
3.Infinite loop
4.5 15
Posted Date:-2022-02-07 09:48:00
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"
end1.[[1, 2, 3, 4], [0, 0, 0, 0]].
2.Equal
3.Not equal
4.None of the mentioned
Posted Date:-2022-02-07 10:43:20
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
1.[[1, 2, 3, 4], [0, 0, 0, 0]].
2.[[1, 2, 3, 4], [0, 0, 0, 0], [1, 2, 3, 4], [0, 0, 0, 0]].
3. [].
4.Error
Posted Date:-2022-02-07 10:47:29
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
1. [[1, 2, 3, 4], [0, 0, 0, 0]].
2. [[1, 2, 3, 4], [0, 0, 0, 0], [1, 2, 3, 4], [0, 0, 0, 0]].
3.[[2,4,6,8],[0,0,0,0]].
4.None of the mentioned
Posted Date:-2022-02-07 10:44:44
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"
end1. [[1, 2, 3, 4], [0, 0, 0, 0]].
2.Equal
3.Not equal
4.None of the mentioned
Posted Date:-2022-02-07 10:42:21
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
1. [[1, 2, 3], [0, 0, 0]].
2. [[1, 2, 3, 4], [0, 0, 0, 0], [1, 2, 3, 4], [0, 0, 0, 0]].
3.[].
4.Error
Posted Date:-2022-02-07 10:48:54
What is the output of the given code? counter = 1 until counter > 10 puts counter counter+=1 end
1.1 2 3 4 5 6 7 8 9 10
2.11 12 13 14 … infinite loop
3.0 1 2 3 4 5 6 7 8 9
4.None of the mentioned
Posted Date:-2022-02-07 10:08:07
What is the output of the given code? i = 0 while i < 5 puts i i=(i+1)**2 end
1.1 2 3 4 5
2.0 1 4
3.0 1
4.1 4
Posted Date:-2022-02-07 09:46:40
What is the output of the given code? i = 3 while i > 0 do print i i -= 1 end
1.3
2.321
3.Infinite loop
4.3 2 1 0
Posted Date:-2022-02-07 09:56:49
What is the output of the given code? i = 50 j=55 while i > 25 && i*j<100 do puts (50*j)/i i -= 1 j-=2 end
1.25 35
2.No output
3.Infinite loop
4.55 54 53 52 51 50 48 47 46 45
Posted Date:-2022-02-07 10:05:49
What is the output of the given code? multi_d_array = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]] print multi_d_array
1. [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]].
2.[0, 0, 0, 0].
3.[0, 0, 0, 0][0, 0, 0, 0].
4.None of the mentioned
Posted Date:-2022-02-07 10:40:57
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
1. [“a”,”e”,”i”,”o”,”u”].
2.Error
3.o True False
4.None of the mentioned
Posted Date:-2022-02-07 10:26:11
What is the output of the given code? string_array = ["a","e","i","o","u"] print string_array
1.[“a”,”e”,”i”,”o”,”u”].
2. Error
3.Vowels
4.None of the mentioned
Posted Date:-2022-02-07 10:23:04
What is the output of the given code? string_array = ["a","e","i","o","u"] print string_array
1.“a”,”e”,”i”,”o”,”u”].
2.Error
3.Vowels
4.None of the mentioned
Posted Date:-2022-02-07 11:23:44
What is the output of the given code? string_array = ["a","e","i","o","u"] print string_array[3]
1.[“a”,”e”,”i”,”o”,”u”].
2.Error
3.o
4.None of the mentioned
Posted Date:-2022-02-07 10:25:02
What will be the output of the following? array = [100, 200, 300, 400, 500] print "array[5]"
1.array[5].
2.500
3.Nil
4.None of the mentioned
Posted Date:-2022-02-07 10:16:24
What will be the output of the following? array = [100, 200, 300, 400, 500] print array[4]
1.400
2.500
3.Nil
4.None of the mentioned
Posted Date:-2022-02-07 10:13:49
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"
end1.Equal
2.Not equal
3.Error
4.None of the mentioned
Posted Date:-2022-02-07 10:21:32
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"
end1.They are equal
2.Not equal
3.Nil
4.None of the mentioned
Posted Date:-2022-02-07 10:17:29