dr-quine/C/Grace/Grace.c
2026-01-31 13:06:58 +01:00

12 lines
779 B
C

#include <stdio.h>
#define TO_WRITE "#include <stdio.h>%1$c%1$c#define TO_WRITE %3$c%4$s%3$c%1$c#define PROG()int main(void) {%2$cFILE *new_file = fopen(%3$cGrace_kid.c%3$c, %3$cw%3$c);%2$cif (new_file == NULL)%2$c%2$creturn 1;%2$cfprintf(new_file, TO_WRITE, 10, 9, 34, TO_WRITE);%2$cfclose(new_file);%2$creturn 0;}%1$c%1$c/**%1$c * @brief Actually the only is to hide this main on a define%1$c *%1$c * @return 0 on success overwise return 1%1$c */%1$c%1$cPROG()%1$c"
#define PROG()int main(void) { FILE *new_file = fopen("Grace_kid.c", "w"); if (new_file == NULL) return 1; fprintf(new_file, TO_WRITE, 10, 9, 34, TO_WRITE); fclose(new_file); return 0;}
/**
* @brief Actually the only is to hide this main on a define
*
* @return 0 on success overwise return 1
*/
PROG()