Home / Programming MCQs / Ruby MCQs / Question
Y
Q. What will be output for the following code When input number is ""!""?
def catch_and_throw(value) puts value a = readline.chomp throw :value_e if a == ""!"" return a end catch :value_e do number = catch_and_throw(""Enter Number: "") end
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What is the output of the code? variable=true if !variable puts "true" else puts "false" end
In Ruby, what does the `case` statement allow you to compare against?
Among the following which operator has lowest Precedence?
What does the super keyword do in a Ruby class method?
What is the correct syntax for defining a variable in Ruby?
What is the purpose of the lazy method in Ruby enumerators?
Which concept in OOP allows objects to exhibit multiple behaviors based on their types or class?
What does the (?<!...) construct represent in a regular expression in Ruby?
Discusssion
Login to discuss.