From: patrick-scho Date: Tue, 30 Sep 2025 09:37:08 +0000 (+0200) Subject: add printself.c X-Git-Url: https://gitweb.ps.run/onefile/commitdiff_plain/HEAD add printself.c --- diff --git a/printself.c b/printself.c new file mode 100644 index 0000000..dd5f0e1 --- /dev/null +++ b/printself.c @@ -0,0 +1,28 @@ +// cc printself.c -o printself && diff <(./printself) printself.c +#include +int main() { + const char *f = (const char[]){32,32,32,32,32,32,32,32,34,37,115,34,44,10,0}; + const char **s = (const char*[]) { + "// cc printself.c -o printself && diff <(./printself) printself.c", + "#include ", + "int main() {", + " const char *f = (const char[]){32,32,32,32,32,32,32,32,34,37,115,34,44,10,0};", + " const char **s = (const char*[]) {", + " };", + " for (int i = 0; i <= 4; i++)", + " puts(s[i]);", + " for (int i = 0; i <= 13; i++)", + " printf(f, s[i]);", + " for (int i = 5; i <= 13; i++)", + " puts(s[i]);", + " return 0;", + "}", + }; + for (int i = 0; i <= 4; i++) + puts(s[i]); + for (int i = 0; i <= 13; i++) + printf(f, s[i]); + for (int i = 5; i <= 13; i++) + puts(s[i]); + return 0; +}