Logo

Programming-Idioms

  • Clojure
  • Fortran

Idiom #182 Quine program

Output the source of the current program. A quine is a computer program that takes no input and produces a copy of its own source code as its only output.

Reading the source file from disk is cheating.

! See original attribution URL

Not written by me, just a link to Rosetta Code.
int main(){char*s="int main(){char*s=%c%s%c;printf(s,34,s,34);return 0;}";printf(s,34,s,34);return 0;}

New implementation...
< >
a