What is concatenating string in ruby. In how many ways you can create a concatenating string.



What is concatenating string in ruby. In how many ways you can create a concatenating string...

Answer / Avinash Verma

Concatenation in Ruby refers to combining multiple strings together. There are several ways to concatenate strings:
1. Using the '+' operator: 'str1' + 'str2'
2. Using << for append operation: 'str' << 'append_string'
3. Using the 'n' operator for multi-line strings: 'str1nstr2'

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Explain ruby class.

1 Answers  


What is the difference between static and dynamic scaffolding?

1 Answers  


As you know ruby provides four types of variables. List them and provide a brief explanation for each?

1 Answers  


Explain about Class variable and global variable?

1 Answers  


Overview of ruby programming language?

1 Answers  


What is the difference between ruby 1.9 and ruby 2.0?

1 Answers  


How do you handle exceptions in ruby code?

1 Answers  


what is the syntax for Ruby collect Iterator?

1 Answers  


What is the use of interpolation in ruby?

1 Answers  


Explain raise statement in Ruby?

1 Answers  


How to read a file in Ruby?

1 Answers  


Do you know when self.up and self.down method is used?

1 Answers  


Categories