Dit is de samenvatting van het derde hoofdstuk van het vak Structuur van Computerprogramma's II. In deze samenvatting werd zowel alle relevante informatie uit de slides als informatie uit eigen notities opgenomen.
Hoofdstuk 3a: Pointers
1 Variables (recap from Chapter 1)
• a variable refers to an object that holds a value
o an object is a memory area with an address
• a lvalue is an expression referring to an object
o identifies a place where a result can be stored
• a rvalue designates a value
2 Addresses vs Contents
Wat we vinden
op een bepaald
adres =/= adres
zelf
3 Pointer
• = Variable that holds the address of another variable as its value.
100
1
, 3.1 Content of a Pointer Variable
3.2 Indirection or Dereferencing Operator
3.3 Addressing Variables
• What doesn’t have an address?
o register variables
o constants/literals/preprocessor
defines
o expressions (unless result in a
variable or array element)
• & operator only applies to objects in
memory : variables and array elements
2
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller lennyS. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.79. You're not tied to anything after your purchase.