Output of Following program is : hai
hai
I didn\'t get how the \\r carriage return works in this program and in real can any one help me out
\\r
Step-by-step:
[newline]ab
ab
[backspace]si
asi
[carriage-return]ha
Carriage return, does not cause a newline. Under some circumstances a single CR or LF may be translated to a CR-LF pair. This is console and/or stream dependent.