grace with comment and writting into file

This commit is contained in:
asus
2024-01-25 15:23:13 +01:00
parent 2e0b5dd8d9
commit 805f3b695f

View File

@@ -1,6 +1,8 @@
#include <stdio.h>
#define xstr(s) #s
#define str(s) xstr(s)
#define MAIN(s) int main() { char *quine = "#include <stdio.h>\n#define xstr(s) #s\n#define str(s) xstr(s)\n#define MAIN(s) "s"\n\nMAIN(str(MAIN(s)))\n"; printf(quine); return 0; }
#define MAIN(s) int main() { char *quine = "#include <stdio.h>\n#define xstr(s) #s\n#define str(s) xstr(s)\n#define MAIN(s) "s"\n/*\n comment\n*/\nMAIN(str(MAIN(s)))\n"; FILE *file = fopen("Grace_kid.c", "w"); fprintf(file, "%s", quine); return 0; }
/*
comment
*/
MAIN(str(MAIN(s)))