MCQs > IT & Programming > Ruby > Output of Ruby code? print <

Ruby MCQs

What is the output of the following code, when executed at the Ruby command prompt?
print <<EOF
This is a sample text
EOF
print <<"EOF";
This is a sample text too
EOF

Answer

Correct Answer:

This is a sample text

This is a sample text too   


Explanation:

Note: This Question is unanswered, help us to find answer for this one

Ruby Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Ruby Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it