Skip to content

Instantly share code, notes, and snippets.

@Endle
Created March 3, 2014 09:42
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 Endle/9321564 to your computer and use it in GitHub Desktop.
Save Endle/9321564 to your computer and use it in GitHub Desktop.
Test C array out of range
/* gcc t.c -Wall -Werror -o test && ./test */
#include <stdio.h>
int arr[10];
int main()
{
int n;
scanf("%d", &n);
printf("got %d\n", arr[n]);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment