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.

Why is gets not preferred instead of gets.chomp?

a) Gets add an extra new line while chomp removes it
b) Gets remove an extra new line
c) Chomp erases the value stored in the variable
d) all of the mentioned

Answer: a
Explanation: gets.chomp will remove the extra blank space.

Join The Discussion