Implementado por Nicholas Carlini para IOCCC 2020 (The International Obfuscated C Code Contest). Aunque la finalidad principal de printf es hacer de "El único debugger real", también resulta que es Turing completo (ver "Control-Flow Bending: On the Effectiveness of Control-Flow Integrity" donde se explica en un paper académico).
|
etiquetas: c , ioccc , tic-tac-toe , printf
git clone github.com/carlini/printf-tac-toe
cd printf-tac-toe
gcc printtt.c
./a.out
No sé, Rick...
We ab^H^Huse this fact to implement a the logic of tic-tac-toe entirely within this one printf call (and a call to scanf() to read user input).
Bingo.
create thescanf() format string.