Home / Programming Questions / Ruby MCQs / Page 15
Dear candidates you will find MCQ questions of Ruby here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
M
Q. Which method is used to write content in the file ?
M
Q. Which of the following is correct difference between foreach and readlines?
M
Q. Which of the method is used to returns the contents of the file line by line?
M
Q. Which method is used to change the mode or permissions/access list of a file?
Y
Q. In ruby, Exception handling is a process which describes a way to handle the __________.
Y
Q. Which statement is used to execute the rescue block again from the beginning after capturing the exception?
Y
Q. What will be output for the following code?
begin raise 'Exception Created!' puts 'After Exception' rescue puts 'Finally Saved!' retry end
Y
Q. Raise Statement is used for?
Don't have account? Register here.