Ruby on Rails MCQ multiple choice questions and answers to prepare for the entrance written test. Ruby on Rails quiz Objective questions and solutions. Professionals, Teachers, Students and Kids Trivia Quizzes to test your knowledge on the subject.

Ruby on Rails MCQ Questions and Answers Quiz

1. Which of the following languages syntax matches with the Rubys syntax?

  1. Perl
  2. PHP
  3. Jquery
  4. Java

2. What is the extension used for saving the ruby file?

  1. .ruby
  2. .r
  3. .rb
  4. ry

3. What does the notation \b stands for?

  1. Escape
  2. Space
  3. Backspace
  4. Newline

4. What is the sequence of ruby strings?

  1. 16-bit bytes
  2. 8-bit bytes
  3. 12-bit bytes
  4. none of these

5. Which of the following is not a valid datatype in Ruby?

  1. Float
  2. Integer
  3. Binary
  4. Timedate

6. Which of the following is not a valid library function?

  1. Puts
  2. Print
  3. Gets
  4. Get

7. Why is the library function Puts used for?

  1. Prints whatever is given and print it to the screen
  2. Prints whatever is given and insert a new(blank) line
  3. Gets input from the user
  4. none of these

8. What is the output of the given code? print "Hi" puts "Welcome!"

  1. Error
  2. Hi Welcome!
  3. Hi
  4. Welcome!

9. For getting an input from the user which method is used?

  1. gets
  2. gets.chomp
  3. gets-s
  4. chomp

10. Which sequence can be used to substitute the value of any ruby expression in a string?

  1. #(expr)
  2. #{expr}
  3. #expr
  4. none of the above
Tags

MCQ Multiple Choice Questions and Answers on Ruby on Rails

Ruby on Rails Trivia Questions and Answers PDF

Ruby on Rails Question and Answer

Spreading Knowledge Across the World

USA - United States of America  Canada  United Kingdom  Australia  New Zealand  South America  Brazil  Portugal  Netherland  South Africa  Ethiopia  Zambia  Singapore  Malaysia  India  China  UAE - Saudi Arabia  Qatar  Oman  Kuwait  Bahrain  Dubai  Israil  England  Scotland  Norway  Ireland  Denmark  France  Spain  Poland  and many more....