Skip to content

Instantly share code, notes, and snippets.

@scottopell
Created May 4, 2016 15:24
Show Gist options
  • Save scottopell/d53594f1e9e5012a77c00c4b458edb87 to your computer and use it in GitHub Desktop.
Save scottopell/d53594f1e9e5012a77c00c4b458edb87 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(){
int i = 0;
int a = 3;
int b = 5;
{
int c = 7;
printf(" c: %d\n", c);
printf("&c: %u\n", &c);
}
printf("&b: %u\n", &b);
int * c_ = ((unsigned long)&b) - sizeof(int);
printf("c_: %u\n", c_);
printf(" c: %d\n", *(c_));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment