What is the output of the following code?
$debug=56
print "Sample Text\n" if $debug
56
Sample Text
No output
All Error is given
Correct Answer:
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Ruby Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Ruby MCQ Questions
Consider the following Interactive Ruby Shell console quotes. In one of the quotes. ==- Is not the real irb result. Which of the following is that quote?
Which of the following directives used with the method Time.strftime are correct?
In the Ruby programming language. 'true‘ is a type of:
Which of the following statements regarding catch and throw blocks are true?
What is the purpose of the following hash method in Ruby?
What is the output of the following code in Ruby? puts 'hello world'.sub(/[aeiou]/, '*')
Which of the following statements regarding '.eql?’ and ’.equal?' are correct?
The following code snippet has two methods, namely 'method1' and 'method2'. def method1 x = 'This' y = 'is' z = 'test' end puts method1 def method2 x = 'This' y = 'is' z = 'test' return x, y, z end print method2
What is the difference between 'redo' and 'retry' statements in Ruby?
if there are two variables x and y, such that x=10 and y=5, then: