Examveda
Examveda

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

A. Error in compilation

B. Give your address

C. What's your address? Chennai
Tamilnadu
600048
Iam from Chennai city, Tamilnadu state, pincode: 600048

D. None of the mentioned

Answer: Option C


This Question Belongs to Ruby Programming >> Basic Syntax In Ruby

Join The Discussion

Related Questions on Basic Syntax in Ruby