Vidyalelo
Ruby Programming · Q21

Data Types and Variables in Ruby

Programming · Ruby Programming · question 21

Q21

What is the correct way to concatenate two strings in Ruby?

A.
str1.concat(str2)
B.
str1 + str2
Answer
C.
str1.append(str2)
D.
str1.combine(str2)

Answer: Option B

Solution

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