Saturday, May 16, 2009

Why doesn’t the following code print the newline properly?

Because inside the single quotes the \n character is not interpreted as newline, just as a sequence of two characters - \ and n.

No comments:

Post a Comment