Question: Problem Description Introduction Pointer variables are a feature of systems programming languages, such as C + + or C , that are able to store

Problem Description
Introduction
Pointer variables are a feature of systems programming languages, such as C++ or C , that are able to store the memory addresses of other variables and objects used by the program. Knowing the address of an object can very convenient. You can freely pass it around into functions, if the function needs to operate on that object.
The usefulness of addresses is pretty obvious in real life: the Ventura City College campus is a huge multi-building complex. It is really big. So big that you cannot move it around, and you definitely cannot put the whole Ventura City College campus in your pocket.
On the other hand, its address, 4667 Telegraph Road Ventura, CA 93003, is much smaller than the building itself, you can write it down on a piece of paper to pass it around to other people or to keep it in your notes without taking much space.
So, a pointer variable is pretty much like this piece of paper with the address. It takes a little bit of memory (several bytes, the exact number can vary depending on your system and the type of pointer), and lets you refer to other (potentially much bigger) objects.
Operators & and *: &x is the address of the object x*p is the object at the address pointed by p
Action of these operators in the VCCCD campus analogy: & VCCCD ....->>>4667 Telegraph Road Ventura, CA 93003
4667 Telegraph Road Ventura, CA 93003...>>> VCCCD
 Problem Description Introduction Pointer variables are a feature of systems programming

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!