P
Prasad
Hi All,
If the string is say, str = "Hello\nWorld" ;
Now, when I call printf ( "%s", str) ;
It is printed as
Hello
World.
But I want it to be printed as "Hello\nWorld". Hence, I need to escape
the \n with an extra \ ie. \n should be replaced with \\n.
What is the best way to do it? for all \n, \t, \b etc
Thanks and regards,
Prasad.
If the string is say, str = "Hello\nWorld" ;
Now, when I call printf ( "%s", str) ;
It is printed as
Hello
World.
But I want it to be printed as "Hello\nWorld". Hence, I need to escape
the \n with an extra \ ie. \n should be replaced with \\n.
What is the best way to do it? for all \n, \t, \b etc
Thanks and regards,
Prasad.