Skip to content

Instantly share code, notes, and snippets.

@eraserhd
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save eraserhd/be71fdced7c19b03ffdd to your computer and use it in GitHub Desktop.

Select an option

Save eraserhd/be71fdced7c19b03ffdd to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int a = 42;
printf("a is %d\n", a);
printf("The address of a is %p\n", &a);
exit(0);
}
[jfelice@GM19348 tmp]$ gcc foo.c
[jfelice@GM19348 tmp]$ ./a.out
a is 42
The address of a is 0x7fff5a6d24bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment