O'Reilly logo

Programming Techniques Through C: A Beginner's Companion by M. G. Venkateshmurthy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 9

Pointers

Pointers are one of the most sophisticated features of the C language. A pointer is just another data type available in C. Understanding pointers needs the understanding of the meaning of an address. Below is given a brief discussion, the study of which helps in understanding the meaning of addresses and pointers.

We have been using variables declaration statements with almost all the functions developed hitherto. It is time to look closely to see what happens when a declaration statement is used. For example, consider the statement

int temp = 10;

The above statement:

  1. Reserves a memory location (of 2 bytes size).
  2. Names the memory location with the name temp.
  3. Stores an integer value 10 in the location.

At the machine level ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required