Aboat printf?

  • Thread starter Thread starter blue blue
  • Start date Start date
B

blue blue

#include<stdio.h>
void main()
{
printf(" xy z \bw\t pg\ra\n");
}


result:
axy zw pg



Why?
Thanks!
 
blue blue said:
#include<stdio.h>
void main()
{
printf(" xy z \bw\t pg\ra\n");
}


result:
axy zw pg

Why?
Thanks!

Well, that's C, not C#, but \b is a backspace, which is why the space
after the z is "eaten", \t is a tab which is why the pg is so far over,
and \r is a carriage return (i.e. go back to the start of the line)
which is why the a comes before the xy.
 
Back
Top