Created
November 9, 2012 02:29
-
-
Save cslott/4043344 to your computer and use it in GitHub Desktop.
Creating Pointers - CSFE 8.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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