Skip to content

Instantly share code, notes, and snippets.

@tjfontaine
Created June 11, 2013 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjfontaine/5760336 to your computer and use it in GitHub Desktop.
Save tjfontaine/5760336 to your computer and use it in GitHub Desktop.
#include <stdio.h>
static char foo[] = "hello world";
void setme(char **data) {
(*data) = foo;
}
int main() {
char *newdata = NULL;
setme(&newdata);
printf("%s\n", newdata);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment