Basic Syntax In Ruby - Study Mode

[#31] Which of the following is the valid string method?
Correct Answer

(D) The .irreverse method

[#32] The .length method is used to check number of characters.
Correct Answer

(B) False

[#33] What is the size of an integer data type in ruby?
Correct Answer

(B) -2 30 to 2 (30-1)

[#34] What is the output of the given code? Ans=Ruby
puts "#{Ans} is an oop language"
puts "It is very efficient langauge"
puts "#{expr} is used on rails platform"
Correct Answer

(B) Ruby is an oop language It is very efficient langauge undefined local variable

[#35] This the right way to comment a single line. “Ruby”.length # I’m a single line comment!
Correct Answer

(A) True