Skip to content

Instantly share code, notes, and snippets.

@sarahhodne
Created June 14, 2009 10:43
Show Gist options
  • Save sarahhodne/129634 to your computer and use it in GitHub Desktop.
Save sarahhodne/129634 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(void)
{
char *foo;
foo = malloc(sizeof(char) * 4);
*foo = "foo";
printf("%s\n", foo);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment