Skip to content

Instantly share code, notes, and snippets.

@rtldg
Last active October 4, 2019 17:23
Show Gist options
  • Select an option

  • Save rtldg/7e836c49e7bc82343086910ea5c659db to your computer and use it in GitHub Desktop.

Select an option

Save rtldg/7e836c49e7bc82343086910ea5c659db to your computer and use it in GitHub Desktop.
quine.c -- 78 characters (warnings) / 120 characters (no warnings)
#define s(a)char*B=#a;a
#include<stdio.h>
s(int main(){printf("#define s(a)char*B=#a;a\n#include<stdio.h>\ns(%s)", B);})
#define s(a)int*B=#a;a
s(main(){printf("#define s(a)int*B=#a;a\ns(%s)\n",B);})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment