Skip to main content Accessibility help
×
Hostname: page-component-cb9f654ff-lqqdg Total loading time: 0 Render date: 2025-08-11T20:57:38.559Z Has data issue: false hasContentIssue false

14 - Pointer

Published online by Cambridge University Press:  17 July 2025

Subrata Saha
Affiliation:
Techno India Hooghly, West Bengal
Subhodip Mukherjee
Affiliation:
Techno India College of Technology, West Bengal
Get access

Summary

Any physical entity can be accessed by its name as well as its address. For example, if address of the building, ‘Chatterjee International Centre’ is ‘33A, Chowringhee Road, Kol-71’, then to mention the building we can say ‘Chatterjee International Centre’ or the building at ‘33A, Chowringhee Road, Kol-71’. The same concept is applicable for accessing variables also. This means even though we accessed the variables by its name so far but we can access them by their address also. In this chapter, we will discuss about the accessibility of the variables by means of their addresses.

(Note that ‘a building having address but not having any name’ is possible but ‘a building having a name but not having any address’ cannot exist. Similarly all variables should have a unique memory address, but a memory address not having a unique variable name can still be accessed by its address using the pointer pointing to it.)

POINTER

Pointer provides a flexible, powerful and efficient method to manipulate data in our programs. In C language, a pointer is a variable that can store the address of some memory location. Each memory location in the computer, i.e., in the RAM has an address. By storing that address a pointer variable actually points to or references the particular memory location where the data are stored. As now a pointer variable can be used to access memory locations, the content of the memory locations can be accessed and modified easily.

Information

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 2016

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Book purchase

Temporarily unavailable

Accessibility standard: Unknown

Accessibility compliance for the PDF of this book is currently unknown and may be updated in the future.

Save book to Kindle

To save this book to your Kindle, first ensure no-reply@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×