Home / Programming MCQs / Ruby MCQs / Question
M
Q. What is the output of the expression: "5".to_i + 2 in Ruby?
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What does the 'chomp' method do in Ruby?
What does polymorphism allow in Ruby?
What is the purpose of the Time.now method in Ruby?
Which keyword is used to call a method on an object in Ruby?
What does the `split` method do when called on a string in Ruby?
What is the purpose of the `extend` keyword in Ruby classes?
What is the purpose of the --install-dir flag when installing gems using Bundler?
What is the data type of the value "true" in Ruby?
What is the output of the given code? a=[1,2,3,4,5] b=[1,2,4,6,8] if a[3]==b[2] print "Equal" end
What is the output of the code? variable="true".length if variable puts "true" else puts "false" end
Discusssion
Login to discuss.