© Slobodan Dmitrović 2021
S. DmitrovićModern C for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-6643-4_10

10. Pointers

Slobodan Dmitrović1  
(1)
Belgrade, Serbia
 

Data is stored in computer memory. The CPU reads from and writes to this memory. Computer memory, in simple terms, is an array of cells, where each cell has its own number we call an address. Our data objects reside in these memory cells, and each of these data objects has its address. If we know the address of an object, we can use pointers to access data objects in memory.

10.1 Introduction

So far, we have used regular variables to access these data objects in memory. Another way to manipulate data in these data objects is through pointers. A pointer is just like any other variable. ...

Get Modern C for Absolute Beginners: A Friendly Introduction to the C Programming Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.