Because you do not check for:
fgets(string, 256, fp) != NULL
You do not write something in your variable anymore but you did not reach EOF so you continue to print the last known value of string.