Vidyalelo
Ruby Programming · Q131

Basic Syntax in Ruby

Programming · Ruby Programming · question 131

Q131

Why is gets not preferred instead of gets.chomp?

A.
Gets add an extra new line while chomp removes it
Answer
B.
Gets remove an extra new line
C.
Chomp erases the value stored in the variable
D.
All of the mentioned

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board