Tic-Tac-Toe Implemented In Single Call To Printf():
[Nicholas Carlini] programmed a C implementation of two-player Tic Tac Toe, and he did it in a single call to printf(). The arguments for that single function call get mind-bendingly complex, so it may come as no surprise that it was written for The International Obfuscated C Code Contest (IOCCC).
Most of us are aware that printf() is one of those functions that is considerably more complex under the hood, and capable of far more, than it may appear to be. But did you know that it is capable of Turing-complete computation?
Can't wait to see the version that can play checkers and chess!
(Score: 2) by bzipitidoo on Saturday June 06 2020, @10:02PM
Though, I admit to it being a bit cheap :D. And, it's definitely more conveniently done with fputs, so you don't have to redirect stdout.
Just puts() the source code of whatever tic-tac-toe program you like to an appropriately named file, use an exec call to run cc to compile it, then another exec call to run the just compiled program.