\r line feed first it eliminate the first two letter so it eliminate ab then,it print the character after \r line feed character. so it display ha and remaining character s .so the result has.
In these previous section I say first it eliminate first two letter. so there printf statement first two letter are mn .it will eliminate mn then it will display
it is similar to the pervious section. but it the previous printf it has two remaining letter are mn .it place remain letter in to there middle section between \r pervious section and \r after section letter