Skip to content

Instantly share code, notes, and snippets.

@fser
Created September 14, 2014 22:19
Show Gist options
  • Save fser/a358b42b8d0b3117714c to your computer and use it in GitHub Desktop.
Save fser/a358b42b8d0b3117714c to your computer and use it in GitHub Desktop.
Compile using gcc -c {a,b}.c; gcc -o sample {a,b}.o. This program crashes, can you guess why?
char toto[] = "hello world";
extern char* toto;
int main(void)
{
putchar(toto[2]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment