C Programming Language: Arrays and Dynamic Allocation
C Programming Language: Arrays and Dynamic Allocation
Math 230 Assembly Language Programming
(Computer Organization) Thu Jan 23, 2008 Lecture 4
Learning Objectives
? Pointer Review, and call-by-reference
? Array Names as Pointers
Indirect referencing: Convert integer indexed array notation to pointer notation
? Pointer Arithmetic
Use pointers vs indices for array processing
? Passing and Using Array Addresses
pointer declaration vs standard for formal parameter
? Dynamic Memory
1d, 2d
2
Easy Steps to Pointers
? Step 1: Declare the variable to be pointed to
int num; char ch = `A'; float x;
num: ch: `A' x:
3
Easy Steps to Pointers (cont)
? Step 2: Declare the pointer variable
int num; char ch = `A'; float x;
int* numPtr = NULL; char *chPtr = NULL; float * xPtr = NULL;
numPtr: chPtr: xPtr:
num:
NULL NULL NULL
ch: `A'
x:
4
Easy Steps to Pointers (cont)
? Step 3: Assign address of variable to pointer
int num; char ch = `A'; float x;
int* numPtr = NULL; char *chPtr = NULL; float * xPtr = NULL;
numPtr: chPtr: xPtr:
num: ch: `A' x:
5
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- c programming language arrays and dynamic allocation
- cs 31 intro to systems pointers and memory
- c strings and pointers city university of new york
- lecture 06 pointer to a pointer
- pointers swarthmore college
- tutorial 1 c tutorial pointers strings exec
- declaring and checking non null types in an object
- lecture 05 pointers continued
Related searches
- java programming language book pdf
- the java programming language pdf
- java programming language tutorial pdf
- java programming language pdf download
- java programming language for beginners
- c programming language standard
- c programming language specification
- programming language popularity
- c programming int to string
- types and programming language pdf
- the c programming language brian kernighan
- c programming language history