Skip to content

Instantly share code, notes, and snippets.

@maeharin
Created December 21, 2012 03:33
Show Gist options
  • Save maeharin/4350493 to your computer and use it in GitHub Desktop.
Save maeharin/4350493 to your computer and use it in GitHub Desktop.
practice c pointer
#include <stdio.h>
int main(void)
{
int x = 1;
int *p = &x;
printf("%d\n", x);
printf("%p\n", &x);
printf("%d\n", *&x);
printf("%p\n", p);
printf("%d\n", *p);
printf("%p\n", &*p);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment