81.
What is the use of .capitalize method?

88.
What is the output of the given code?
print "What's your address"
    city,state,pin=gets.chomp,gets.chomp,gets.chomp
    puts "Iam from #{city} city, #{state} state, pincode: #{pin} "

89.
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}"

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.