B blue blue Jun 12, 2005 #1 #include<stdio.h> void main() { printf(" xy z \bw\t pg\ra\n"); } result: axy zw pg Why? Thanks!
J Jon Skeet [C# MVP] Jun 12, 2005 #2 blue blue said: #include<stdio.h> void main() { printf(" xy z \bw\t pg\ra\n"); } result: axy zw pg Why? Thanks! Click to expand... 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.
blue blue said: #include<stdio.h> void main() { printf(" xy z \bw\t pg\ra\n"); } result: axy zw pg Why? Thanks! Click to expand... 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.