ExamVeda
Login
Home
1
Which of the following are valid floating point literal?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
2
What is the role of ! at the end of the capitalize method?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
3
What will be the output of the given code?
"I'am learning Ruby Language".length.reverse.upcase
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
4
What is the range of octal notation (\nnn)?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
5
Which of the following type of comments are valid in ruby?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
6
Why do we use =begin and =end?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
7
What is the output of the given code?
 x, y, z = 12, 36, 72
    puts "The value of x is #{ x }."
    puts "The sum of x and y is #{ x + y }."
    puts "The average was #{ (x + y + z)/3 }."
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
8
What is the output of the given code?
print "What's your first name?"
   first_name=gets.chomp
   a=first_name.capitalize
   a=a.reverse
   puts"My name is #{a}"
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
9
What is the output of the given code?
Ans=Ruby
    puts "#[Ans] is an oop language"
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
10
Objects of which class does the integer from the range -2^30 to 2^(30-1) belong to?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board