CHAPTER

10

Pointers and Dynamic Storage

10.1 Concept of a Pointer

10.2 Address and Pointer Arithmetic

10.3 Pointers and Arrays

10.4 Dynamic Storage and Arrays

10.5 Character Strings and Pointers

10.6 Sample Programs

Chapter Summary

Exercises

Objectives

Understand the concept of pointer variables and their use in the manipulation of data and the dynamic allocation of storage space for data.

In the chapter on arrays, we saw that the array name has the address of the array as its value. Also the ad -dress operator “&” has been introduced and used in calls to system and user input functions so that the input data could be placed directly in the program variables. Now it is time to introduce a form of variables designed to have addresses as their ...

Get C Programming for Scientists and Engineers with Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.