Skip to content

Instantly share code, notes, and snippets.

@cslott
Created November 9, 2012 02:29
Show Gist options
  • Save cslott/4043344 to your computer and use it in GitHub Desktop.
Save cslott/4043344 to your computer and use it in GitHub Desktop.
Creating Pointers - CSFE 8.4
unsigned short int total = 50250;
// unsigned short takes up "two bytes"
// 1100 0100 0100 1010 = 50250
//..
// 1000 - 1100 0100
// 1001 - 0100 1010
//..
// asterisk says creating a pointer
// int *my_pointer; contain memory address
// int my_pointer; contains int
unsigned short int *my_pointer; // contain memory address
my_pointer = 1000 // looks at "memory address 8"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment