Ruby on Rails Quiz Question with Answer


11. What is the output of the following? I am learning ruby language.length

  1. 27
  2. 23
  3. 26
  4. 18

12. What will be the output of the following? Ruby.reverse.upcase

  1. RUBY
  2. ybuR
  3. YBUR
  4. YBUr

13. What is the use of .capitalize method?

  1. It capitalizes the entire string
  2. It capitalize on the first letter of the string
  3. It capitalize the strings which are in small case
  4. none of the mentioned

14. What does %{Learn ruby language} represents?

  1. "Learn Ruby language"
  2. "%{Learn Ruby language}"
  3. " Learn Ruby language "
  4. none of these

15. What does %Q{ Learn ruby language } represents?

  1. " Learn Ruby language "
  2. "%{ Learn Ruby language }"
  3. " Learn Ruby language "
  4. none of the mentioned

16. How to comment a single line in Ruby on Rails?

  1. Using #
  2. Using begin and end
  3. Using //
  4. none of the mentioned

17. What is the output of the given code? "Ruby".length #to find the length of given string

  1. 4 to find the length of given string
  2. 4
  3. To find the length of given string
  4. Ruby

18. Which of the following is a valid conditional statement in Ruby?

  1. else
  2. els
  3. if else
  4. none of the mentioned

19. Which of the following is a valid conditional statement in Ruby?

  1. elseif
  2. elsif
  3. else if
  4. elseiff

Tags :


Multiple Choice Questions and Answers on Ruby on Rails


Ruby on Rails Multiple Choice Questions and Answers


Ruby on Rails Trivia Quiz


Ruby on Rails Question and Answer PDF Online




Spreading Knowledge Across the World

USA - United States of America  Canada  United Kingdom  Australia  New Zealand  South America  Brazil  Portugal  England  Scotland  Norway  Ireland  Denmark  France  Spain  Poland  Netherland  Germany  Sweden  South Africa  Ghana  Tanzania  Nigeria  Kenya  Ethiopia  Zambia  Singapore  Malaysia  India  Pakistan  Nepal  Taiwan  Philippines  Libya  Cambodia  Hong Kong  China  UAE - Saudi Arabia  Qatar  Oman  Kuwait  Bahrain  Dubai  Israil  and many more....