1.

Why is the library function ‘puts’used for?(a) Prints whatever is given and print it to the screen(b) Prints whatever is given and insert a new(blank) line(c) Gets input from the user(d) None of the mentionedThe question was asked during an online interview.My question is from Library Functions topic in portion Ruby Basics of Ruby

Answer»

Correct choice is (b) Prints WHATEVER is given and insert a new(blank) LINE

The BEST I can explain: Puts is a LIBRARY function which prints and then insert a new blank line.



Discussion

No Comment Found

Related InterviewSolutions