Basic Syntax In Ruby - Study Mode

[#16] Which sequence can be used to substitute the value of any ruby expression in a string?
Correct Answer

(B) #{expr}

[#17] What does %x!ls! represents?
Correct Answer

(A) Same as back tick command output 'ls'

[#18] Which of the following datatypes are valid in Ruby?
Correct Answer

(D) All of the mentioned

[#19] Methods should not be written inside double quotes.
Correct Answer

(A) True

[#20] What is the output of the given code? my_string=Ruby
puts(my_string)
Correct Answer

(C) Error