19 lines
438 B
C
19 lines
438 B
C
#include <stdio.h>
|
|
#define xstr(s) #s
|
|
#define str(s) xstr(s)
|
|
#define MAIN(s) \
|
|
int main() \
|
|
{ \
|
|
char *before = "#include <stdio.h>\n#define xstr(s) #s\n#define str(s) xstr(s)\n#define MAIN(s) "; \
|
|
char *quine = s; \
|
|
char *after = "\n/*\n comment\n*/\nMAIN(str(MAIN(s)))\n"; \
|
|
FILE *file = fopen("Grace_kid.c", "w"); \
|
|
fprintf(file, "%s%s%s", before, quine, after); \
|
|
fclose(file); \
|
|
return 0; \
|
|
}
|
|
/*
|
|
comment
|
|
*/
|
|
MAIN(str(MAIN(s)))
|