In computing, a quine is a computer program which produces a copy of its own source code as its only output.
cpp #include <cstdio>
#define B(x) x; printf("{ B(" #x ") }\n");
int main()
{ B(printf("#include <cstdio>\n#define B(x) x; printf(\"{ B(\" #x \") }\\n\");\nint main()\n")) }
#include <cstdio>
#define B(x) x; printf("{ B(" #x ") }\n");
int main()
{ B(printf("#include <cstdio>\n#define B(x) x; printf(\"{ B(\" #x \") }\\n\");\nint main()\n")) }
Submit a new solution for
cpp or
csharp
There are 24 other solutions in
additional languages (
clojure,
fantom,
fsharp,
groovy ...)