Quote:
Originally Posted by kahuna
Yes, truncating sounds as valid as the unlink/rm file solution. But a lot depends on how you parse the challenge. You could parse the challenge to mean that any file access is forbidden. But if that is the case, I don't think it is solvable.
If your going to play word games like that, then you could also parse it it such that:
main() { printf("hello, world\n"); }
is a solution. The program only gives the output once and then it never does anything else. And as requested you must compile the program first. I see no verbage about preventing a rerun of the program.