ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the output of the code
print "What's your first name?"
first_name=gets.chomp
a=first_name.capitalize
first_name.capitalize!
print "What's your last name?"
last_name=gets.chomp
b=last_name.capitalize
last_name.capitalize!
puts "My name is #{first_name} #{last_name}"
Correct Answer: C — What’s your first name amil
a=["hey", "ruby", "language"] and b=["hey", "language", "ruby"]. Order differs, so a != b. Output: 'Not equal'.