πŸ“Š Ruby
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
πŸ’¬ Discuss
βœ… Correct Answer: (C) This is Before Exception Arise! Exception Created!

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
160
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Yatendra Sir
Publisher
πŸ“ˆ
85%
Success Rate