91. What is the output of the given code?
my_string=Ruby
puts(my_string)
my_string=Ruby
puts(my_string)
92. What is the output of the given code?
“Ruby”.length #to find the length of given string
“Ruby”.length #to find the length of given string
93. Which of the following is not a valid library function?
94. What is the output of the given code?
print "what's your first name?"
first_name=gets.chomp
a=first_name.capitalize
"a".reverse
puts"My name is #{a}"
print "what's your first name?"
first_name=gets.chomp
a=first_name.capitalize
"a".reverse
puts"My name is #{a}"
95. What is the output of the given code?
boolean_1 = 77<78
puts(boolean_1)
boolean_1 = 77<78
puts(boolean_1)
96. Ruby can deal with both numbers and floating point values.
97. It is must for Ruby to use a compiler.
98. Why is the library function 'puts'used for?
99. Ruby is a case-sensitive language.
100. What will be the output of the following?
"Ruby".reverse.upcase
"Ruby".reverse.upcase
Read More Section(Basic Syntax in Ruby)
Each Section contains maximum 100 MCQs question on Basic Syntax in Ruby. To get more questions visit other sections.