Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What is the output of the given code
print “Hey”
puts “Everyone!”
print “We are learning Ruby”

What is the output of the given code
print “Hey”
puts “Everyone!”
print “We are learning Ruby”
a) Error
b) Hey everyone we are learning Ruby
c) Hey everyone
d) Hey Everyone
We are learning Ruby

Answer: d
Explanation: Print prints whatever is given and puts in addition to printing it inserts a new blank line.
Output:
Hey Everyone
We are learning Ruby

Join The Discussion