Skip to content

Instantly share code, notes, and snippets.

@alastair
Created April 9, 2013 10:28
Show Gist options
  • Save alastair/5344693 to your computer and use it in GitHub Desktop.
Save alastair/5344693 to your computer and use it in GitHub Desktop.
With some compilers, this will run forever. Why?
int main() {
int array[4];
int i;
for (i = 0; i < 10; i++) {
array[i] = 0;
printf("%d\n", array[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment