Skip to content

Instantly share code, notes, and snippets.

@morganwilde
Forked from Kablys/data
Last active August 29, 2015 13:56
Show Gist options
  • Save morganwilde/9335019 to your computer and use it in GitHub Desktop.
Save morganwilde/9335019 to your computer and use it in GitHub Desktop.
int data[4], // Allocates an array of type int with 4 elements
i; // Allocates an int
for(i = -8; // Initializes i to -8
i < 10;
i++) // Increments i by 1
printf("%d\n", data[i]);// This will generate an error when i is in [-8, 0)u(3, 9]
// This ^ will iterate over the following values
// -8
// -7
// -6
// ...
// 7
// 8
// 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment