Skip to content

Instantly share code, notes, and snippets.

@johnliu
Created January 25, 2013 20:51
Show Gist options
  • Save johnliu/4637740 to your computer and use it in GitHub Desktop.
Save johnliu/4637740 to your computer and use it in GitHub Desktop.
#include <stdlib.h>
#include <stdio.h>
int a = 5;
void f(int **x) {
*x = &a;
printf(" %d ", **x);
}
int main() {
int *x;
*x = 7;
printf("%d", *x);
f(&x);
printf("%d", *x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment