Suggestions
Use up and down arrows to review and enter to select.Please wait while we process your payment
If you don't see it, please check your spam folder. Sometimes it can end up there.
If you don't see it, please check your spam folder. Sometimes it can end up there.
Please wait while we process your payment
By signing up you agree to our terms and privacy policy.
Don’t have an account? Subscribe now
Create Your Account
Sign up for your FREE 7-day trial
Already have an account? Log in
Your Email
Choose Your Plan
Save over 50% with a SparkNotes PLUS Annual Plan!
Purchasing SparkNotes PLUS for a group?
Get Annual Plans at a discount when you buy 2 or more!
Price
$24.99 $18.74 /subscription + tax
Subtotal $37.48 + tax
Save 25% on 2-49 accounts
Save 30% on 50-99 accounts
Want 100 or more? Contact us for a customized plan.
Your Plan
Payment Details
Payment Summary
SparkNotes Plus
You'll be billed after your free trial ends.
7-Day Free Trial
Not Applicable
Renews June 11, 2023 June 4, 2023
Discounts (applied to next billing)
DUE NOW
US $0.00
SNPLUSROCKS20 | 20% Discount
This is not a valid promo code.
Discount Code (one code per order)
SparkNotes Plus subscription is $4.99/month or $24.99/year as selected above. The free trial period is the first 7 days of your subscription. TO CANCEL YOUR SUBSCRIPTION AND AVOID BEING CHARGED, YOU MUST CANCEL BEFORE THE END OF THE FREE TRIAL PERIOD. You may cancel your subscription on your Subscription and Billing page or contact Customer Support at custserv@bn.com. Your subscription will continue automatically once the free trial period is over. Free trial is available to new customers only.
Choose Your Plan
For the next 7 days, you'll have access to awesome PLUS stuff like AP English test prep, No Fear Shakespeare translations and audio, a note-taking tool, personalized dashboard, & much more!
You’ve successfully purchased a group discount. Your group members can use the joining link below to redeem their group membership. You'll also receive an email with the link.
Members will be prompted to log in or create an account to redeem their group membership.
Thanks for creating a SparkNotes account! Continue to start your free trial.
Please wait while we process your payment
Your PLUS subscription has expired
Please wait while we process your payment
Please wait while we process your payment
Remember that steve is an integer and on most modern computers an integer is a 4-byte data type, meaning that one integer takes 4-bytes, or 32 bits, to be stored. When we say that the address of steve is 728, what we mean is that stevestarts at 728 and continues linearly through the memory for as many bytes as needed. Had steve been a character, which on most computers is a single byte data type, steve would have been stored entirely in memory address 728.
Second, what is this "011011100" thing? It's binary notation. When humans do arithmetic, we often use base 10, meaning that each digit in a number represents some power of 10. For example, the decimal number 220 means 2*102 +2*101 +0*100 = 220. But there is no reason we have to use base 10; we can use any base we like. For computers, base 2 is the easiest. In Base 10, we can use digits 0 through 9; in base 2 we can only use the digits 0 and 1. Why is this the easiest base for computers? Because two numbers, 0 and 1, are easily represented by the two states of a simple switch, on and off. Inside your computer are hundreds of millions of these tiny switches that can either be on or off, representing a 0 or a 1. This corresponds nicely to base 2 notation. When you store a number in a computer, the computer actually stores it in base 2, even though you may have entered it in base 10. So, when we store the decimal number 220 into the computer, it is stored in base 2: 1*27 +1*26 +0*25 +1*24 +1*23 +1*22 +0*21 +0*20 = 220, hence the "011011100".
Another base commonly used by computer scientists is hexadecimal notation. Hexadecimal is Base 16, meaning that each digit represents 16 raised to a power (as opposed to 10 raised to a power in decimal notation, or 2 raised to a power in binary notation). The digits in hexadecimal are represented by the numbers 0 through 9, and then the letters A through F, where A is 10, B is 11, etc, through F, which is 15. Why hexadecimal? Because 16 is a power of 2 and corresponds nicely to binary. Every hexadecimal digit (a hexit) is equivalent to four binary digits. Because of this, it is easy to convert from hex to binary and vice versa. This easy conversion makes hexadecimal a convenient notation for representing binary numbers in a more compact form. To let us know that a number is hexadecimal, it is preceded by a "0x". For example, the decimal number 220 is equivalent to the hexadecimal number 0xDC: D*161 + C*160 = 13*16 + 12 = 220.
Octal notation, base 8, is also a common base used by computer scientists for a reason similar to that of hex: 8 is a power of 2. A single octal digit (an octit) is equivalent to three binary digits. Octal notation places a 0 in front of every number.
Base | Representation |
Base 10 (decimal) | 220 |
Base 2 (binary) | 0b011011100 |
Base 8 (octal) | 0334 |
Base 16 (hexadecimal) | 0xDC |
For more information on number representation and bits, please refer to the SparkNote on the topic.
Back to the topic of pointers. Just as the purpose of the steve variable is to store an integer, the purpose of a pointer variable is to store a memory address, often the address of another variable, such as steve. In the next section, we'll see how to declare pointers and how to use them. And after that, we'll see the answer to the question that is probably forefront in your mind: "why?"
Please wait while we process your payment