A TUTORIAL ON POINTERS AND ARRAYS IN C
A TUTORIAL ON POINTERS AND ARRAYS IN C
by Ted Jensen
Version 1.2 (HTML version)
Feb. 2000
This material is hereby placed in the public domain
Available in various formats via
http://www.netcom.com/~tjensen/ptr/cpoint.htm
TABLE OF CONTENTS
- Preface
- Introduction
- Chapter 1: What is a Pointer?
- Chapter 2: Pointer Types and Arrays.
- Chapter 3: Pointers and Strings
- Chapter 4: More on Strings
- Chapter 5: Pointers and Structures
- Chapter 6: More on Strings and Arrays of Strings
- Chapter 7: More on Multi-Dimensional Arrays
- Chapter 8: Pointers to Arrays
- Chapter 9: Pointers and Dynamic Allocation of Memory
- Chapter 10: Pointers to Functions
- Epilog
Welcome to Ted Jensen's Tutorial on
Pointers and Arrays in C
Version 1.2
Last Updated in Feb. 2001
(See Notes at bottom of this page.)This tutorial covers the basics of using pointers and arrays in the C programming language.
- You can Read it Online:
- Download it as a set of HTML pages compressed to a .ZIP File
- Download it as the same set of pages compressed to a .EXE File which unzips itself under MS-DOS or Windows
The tutorial takes up about a dozen web pages. The printed version from either your browser or the text file is going to run around 2500 lines. (About 50 pages at 55 lines/page).
If you have questions or comments you can email me at tjensen@ix.netcom.com.
Notes regarding latest revision 1.2: Feb. 2002
I still program using an MS-DOS 16 bit command line compiler. Victor Volkman of http://www.hal9k.com/cug was kind enough to point out that most PC compilers today are 32 bit systems and as a result sizeof(int) is different on these systems. This version assumes a 32 bit system when discussing sizeof(int). This is made clear in Chapter 1.
I've no longer offer a plain text version of the tutorial. If you feel this is a must, please contact me.