I use CB in windows and the compiler is gcc. When I build and run the program below, I found the result is strange. Can anyone give me an explain?
#include <stdio.h>
int main()
{
int a=5,b=6,c=7;
printf("%d\n%d %d\n %d %d\t\b%d\n",a,b,c,a,b,c);
printf("%d %d\t\b%d\n",a,b,c);
return 0;
}
The result is:
5
6 7
75 6
5 67
I tried DevC++ which use MinGW as compiler and got same result. It seems that is the problem of MinGW.
The result should be (When use Turbo C in DOS or gcc in Linux)
5
6 7
5 6 7
5 6 7