12-06-2003, 07:28 PM
|
#16 (permalink)
|
Tilted
|
Here's a quine in C:
Quote:
char*f="char*f=%c%s%c;main()
{printf(f,34,f,34,10);}%c";
main(){printf(f,34,f,34,10);}
|
Here's a polygot quine in C and TCL(works in both)
Quote:
#define set char*f=
#define F
#define proc main(){
set F "#define set char*f=
#define F
#define proc main(){
set F %c%s%c;
proc /* {} {}
puts -nonewline %cformat %cF 34 %cF 34 91 36 36]
set a {*/printf(f,34,f,34,91,36,36);}
";
proc /* {} {}
puts -nonewline [format $F 34 $F 34 91 36 36]
set a {*/printf(f,34,f,34,91,36,36);}
|
There's a way to make a quine in any language that supports strings, search google if you want.
|
|
|