#include <stdio.h>
#include <string.h>
int main()
{
char src[]="123456";
strcpy(src, &src[1]);
printf("Final copied string : %s\n", src);
}
When I use the Visual Studio 6 compiler, it gives me the expected answer " 23456".
How does this program print " 23556" when compiling with gcc 4.7.2?
source
share