Deepak Verma

Deepak Verma

  • NA
  • 4.1k
  • 933.5k

How to print each substring of a string ?

Mar 29 2011 1:17 AM
Suppose, we have a string str = "This is a Text Book"

Now, we need to print each substring(individually) of str as :

This
is
a
Text
Book

Please anyone write a code snippet to do so.

Answers (3)