Skip to content

Instantly share code, notes, and snippets.

@mppf
Created July 13, 2017 18:37
Show Gist options
  • Save mppf/db6be9850d382dd6cde21f42e7d5dec0 to your computer and use it in GitHub Desktop.
Save mppf/db6be9850d382dd6cde21f42e7d5dec0 to your computer and use it in GitHub Desktop.
#include <stdio.h>
void setit(int* ptr) {
*ptr = 200;
}
void f(int x) {
printf("%i\n", x);
}
int main() {
for(int i = 0; 1; i++ ) {
const int x = 100;
setit((int*) &x);
f(x);
if (i == 200) break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment