C-Review-Pointers - C-Programming Review Pointers &...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science Department University of Central Florida C-Programming Review Pointers & Arrays COP 3502 – Computer Science I
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C-Programming Review: Pointers & Arrays page 2 C-Programming Review POINTERS
Background image of page 2
C-Programming Review: Pointers & Arrays page 3 Review of pointers What is a Pointer? An Address!
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C-Programming Review: Pointers & Arrays page 4 Review of pointers A pointer is just a memory location. A memory location is simply an integer value, that we interpret as an address in memory. The contents at a particular memory location are just a collection of bits – there’s nothing special about them that makes them ints , chars , etc. How you want to interpret the bits is up to you. Is this. .. an int value? ... a pointer to a memory address? ... a series of char values? 0xfe4a10c5
Background image of page 4
C-Programming Review: Pointers & Arrays page 5 Review of pointer variables A pointer variable is just a variable, that contains a value that we interpret as a memory address. Just like an uninitialized int variable holds some arbitrary “garbage” value, an uninitialized pointer variable points to some arbitrary “garbage address” char *m; (char *) m
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
C-Programming Review: Pointers & Arrays page 6 Indirection operator * Moves from address to contents char
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 09/21/2011.

Page1 / 22

C-Review-Pointers - C-Programming Review Pointers &...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online