MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
Ruby Programming
Ruby Programming Basic
Quiz 1
1
2
3
4
5
6
7
8
9
10
Q.1
It is possible to make array of booleans.
a) True
b) False
Q.2
What is the output of the given code? string_array = ["a","e","i","o","u"] print string_array
a) [“a”,”e”,”i”,”o”,”u”].
b) Error
c) Vowels
d) None of the mentioned
Q.3
What is the output of the given code? string_array = ["a","e","i","o","u"] print string_array[3]
a) [“a”,”e”,”i”,”o”,”u”].
b) Error
c) o
d) None of the mentioned
Q.4
What is the output of the given code? string_array = ["a","e","i","o","u"] boolean_array = ["True","False"] puts string_array[puts boolean_array
a) [“a”,”e”,”i”,”o”,”u”].
b) Error
c) o
d) None of the mentioned
Q.5
What is the output of the given code? string_array = ["a","e","i","o","u"] boolean_array = ["True","False"] puts string_array[puts boolean_array[1]
a) [“a”,”e”,”i”,”o”,”u”].
b) Error
c) o
d) None of the mentioned
Q.6
What is the output of the given code? a=[1,2,3,4,b=[1,2,4,6,if a[3]==b[ print "Equal" end
a) Equal
b) Error
c) 4
d) None of the mentioned
Q.7
What is the output of the given code? a=[1,2,3,4,b=[1,2,3,4,if a==b print "Equal" else print "Not equal" end
a) Equal
b) Error
c) Not equal
d) None of the mentioned
Q.8
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
a) Equal
b) Error
c) Not equal
d) None of the mentioned
Q.9
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
a) Equal
b) Error
c) Not equal
d) None of the mentioned
Q.10
What is the output of the given code? a=["hey", "ruby", "language"] b=[puts b[puts a[2]
a) 3 ruby
b) Error
c) 2
d) None of the mentioned
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page