ExamVeda
Login
Home
31
What does the `split` method do when called on a string in Ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
32
In Ruby, how can you add a key-value pair to an existing hash?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
33
What does the `each_key` method do when called on a hash in Ruby?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
34
Which of the following methods is used to check if a key exists in a hash in Ruby?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
35
In Ruby, which method is used to convert a string to uppercase?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
36
What does the `reverse` method do when called on a string in Ruby?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
Arrays can be used to store multiple values in one single variable.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
38
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]
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
39
What will be the output of the following?
array1 = [1,2,3]
array2 = [0,0,0]
if array1 >= array2
print "Greater or equal"
else 
    print "Not equal"
end
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
What is the output of the given code?
string_array = ["a","e","i","o","u"]
print string_array[3]
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board