Y

Yatendra Sir • 5.66K Points
Tutor III

Q. What will be output for the following code?

Code:
begin
         
    puts 'This is Before Exception Arise!'
         
       raise 'Exception Created!'
   
    puts 'After Exception' 
end
  • (A) This is Before Exception Arise! After Exception!
  • (B) Exception Created! After Exception!
  • (C) This is Before Exception Arise! Exception Created!
  • (D) This is Before Exception Arise! Exception Created! After exception
  • Correct Answer - Option(C)
  • Views: 92
  • Filed under category Ruby

Explanation by: Yatendra Sir
The output for the following code is Option C.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics