You appear to be trying to use null terminated strings, but you forgot about the null character.

What is probably happening is that the attempt to print string1 results in the null character only...