Vidyalelo
Ruby Programming · all questions

Basic Syntax in Ruby
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

134

Questions

7/7

Page

Pick an option on a question to see the right answer and solution.

How to comment a single line?

Select an option to see the answer and solution.

What does %{Learn ruby language} represents?

Select an option to see the answer and solution.

What will any variable evaluate to if it is of Boolean data type?

Select an option to see the answer and solution.

What will we the output of the given code?
I'am Learning RUBY Language.downcase

Select an option to see the answer and solution.

What does the notataion \b stands for?

Select an option to see the answer and solution.

The following is the correct way to use multiline comment.
 = begin
   # comment
   = end

Select an option to see the answer and solution.

What is the extension used for saving the ruby file?

Select an option to see the answer and solution.

What is the sequence of ruby strings?

Select an option to see the answer and solution.

Which of the following languages syntax matches with the Ruby's syntax?

Select an option to see the answer and solution.

What does the .upcase method do?

Select an option to see the answer and solution.

Why is gets not preferred instead of gets.chomp?

Select an option to see the answer and solution.

Why can not we use quotation marks (' or ") with boolean?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

What will be the output of the following?
"Eric".irreverse

Select an option to see the answer and solution.