Chapter 5

Pointers

CHAPTER OUTLINE
5.1 INTRODUCTION

Pointers are the most powerful feature of ‘C’. The beginners of ‘C’ find pointers hard to understand and manipulate. In an attempt to unveil the mystery behind this aspect, the basics of pointers which generally remain in background are being discussed in the following sections.

5.1.1 The ‘&’ Operator

When a variable x is declared in a program, a storage location in the main memory is made available by the compiler. For example, Figure 5.1 shows the declaration of x as an integer variable and its storage location in the main memory.

 

 

Fig. 5.1 The variable ...

Get Data Structure Using C now with the O’Reilly learning platform.

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