]> gitweb.ps.run Git - onefile/blob - printself.c
add printself.c
[onefile] / printself.c
1 // cc printself.c -o printself && diff <(./printself) printself.c
2 #include <stdio.h>
3 int main() {
4     const char *f = (const char[]){32,32,32,32,32,32,32,32,34,37,115,34,44,10,0};
5     const char **s = (const char*[]) {
6         "// cc printself.c -o printself && diff <(./printself) printself.c",
7         "#include <stdio.h>",
8         "int main() {",
9         "    const char *f = (const char[]){32,32,32,32,32,32,32,32,34,37,115,34,44,10,0};",
10         "    const char **s = (const char*[]) {",
11         "    };",
12         "    for (int i = 0; i <= 4; i++)",
13         "        puts(s[i]);",
14         "    for (int i = 0; i <= 13; i++)",
15         "        printf(f, s[i]);",
16         "    for (int i = 5; i <= 13; i++)",
17         "        puts(s[i]);",
18         "    return 0;",
19         "}",
20     };
21     for (int i = 0; i <= 4; i++)
22         puts(s[i]);
23     for (int i = 0; i <= 13; i++)
24         printf(f, s[i]);
25     for (int i = 5; i <= 13; i++)
26         puts(s[i]);
27     return 0;
28 }