3
Reply

How to print each substring of a string ?

Deepak Verma

Deepak Verma

Mar 29 2011 1:17 AM
2k
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)