Line feed \r in c++

Type1:
printf(“abs\rha”);
has
Debugging explanation:
\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.


Type2:
printf(“opxy\rha”);
haxy

Type3:
printf(“mn”);
printf(“opxy\rha”);
haopxy
Debugging explanation:
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
haopxy


Type4:
printf(“ljmn”);
printf(“opxy\rha”);
hamnopxy
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

Post a Comment

0 Comments