Last active
August 29, 2015 14:09
-
-
Save eatnumber1/8d0b265276adc24e4c97 to your computer and use it in GitHub Desktop.
The result of a challenge to write in C code that will do the following when run in Python: "good " * 2. I think I got a little carried away.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int main(void) { | |
for (char *s = "good ", l = strlen(s), z = 2 * l, d[z], *p = d; p == d + z ? *--p = 0, !puts(d) : 1; p = memcpy(p, s, l) + l); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment