ExamVeda
Login
Home
1
Which method in Ruby is used to add an element to the end of an array?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
2
What will array.size return in Ruby, if array = [1, 2, 3, 4, 5]?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
3
Which method is used to access the value associated with a specific key in a hash in Ruby?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
4
What is the output of "hello".reverse in Ruby?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
5
In Ruby, how do you convert a string to an array of characters?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
6
Which of the following methods is used to merge two hashes together in Ruby?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
7
What does the << operator do when used with a string in Ruby?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
8
How do you check if a key exists in a hash in Ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
9
What is the output of "hello".upcase in Ruby?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
10
Which method in Ruby is used to remove and return the last element of an array?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board