printf(str);where str points to arbitrary strings you're trying to print out, and that once in a while, the string contains %f. (This is obviously a bad way to print strings, because other % sequences will obviously cause problems, too. Use
printf("%s", str);or
fputs(str, stdout);instead.)