Skip to content

Instantly share code, notes, and snippets.

@olg
Created April 7, 2010 10:55
Show Gist options
  • Save olg/358742 to your computer and use it in GitHub Desktop.
Save olg/358742 to your computer and use it in GitHub Desktop.
void prout(char* s)
{
*(s+1) = 'X';
}
void main() {
char *s1 = (char *) malloc(25);
sprintf(s1, "Hello, World");
char s2[] = "Hello, World";
char* s3 = "Hello, World";
prout(str);
prout(s);
prout(s3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment