Skip to content

Instantly share code, notes, and snippets.

@minshallj
Created January 10, 2015 07:09
Show Gist options
  • Save minshallj/b8303e2ce7aa90812200 to your computer and use it in GitHub Desktop.
Save minshallj/b8303e2ce7aa90812200 to your computer and use it in GitHub Desktop.
What will this gist return? Maybe (most likely) you need to assume certain architectures, so let's just say x86
struct stuff {
int arr[4];
int i;
};
int main() {
struct stuff s;
for (s.i = 0; s.i <= 4; s.i++)
s.arr[s.i] = 0;
return s.i;
}
@minshallj
Copy link
Author

taken mostly from the Stanford cs107 course https://www.youtube.com/watch?v=Ps8jOj7diA0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment