Skip to content

Instantly share code, notes, and snippets.

@cosinekitty
Created November 7, 2019 01:54
Show Gist options
  • Save cosinekitty/9a31c324909e892b4508c4ab1619dccb to your computer and use it in GitHub Desktop.
Save cosinekitty/9a31c324909e892b4508c4ab1619dccb to your computer and use it in GitHub Desktop.
A template for the quine
#include <stdio.h>
int main()
{
int i, k;
char s[] = $;
for(i=0;s[i]!=1;++i)printf("%c",s[i]);
for(k=0;s[k];++k)printf("%c%d", k ? ',' : '{', s[k]);
printf(",0}");
for(++i;s[i];++i)printf("%c",s[i]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment