Y
Q. What will be output for the following code?
begin puts 'This is Before Exception Arise!' raise 'Exception Created!' puts 'After Exception' end
The output for the following code is Option C.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. What does the unless keyword do in Ruby?
Q. What is the output of the given code? a= 5 b=10 while a <10 && b<20 puts a-b a+=2 b+=2 end
Q. In Ruby, which method is used to define getter and setter methods for class attributes?
Q. Which method in Ruby is used to set the position of the file pointer?
Q. What does the File.rename() method in Ruby do?
Q. What does the "stabby lambda" (->) syntax in Ruby represent?
Q. Which Ruby convention is commonly used for naming instance variables?
Q. Which Ruby convention is commonly used for naming classes and modules?
Q. Ruby does not support ++ operator, it only supports += operator.
Discusssion
Login to discuss.