C Programming
Computer Programming

How does a pointer point to another pointer?

91011

Top Answer
User Avatar
Wiki User
Answered
2009-11-15 02:59:42
2009-11-15 02:59:42

A pointer points to another pointer in the same way that a pointer points to a non-pointer object.

Start with a pointer to an object...

int a; // the object

int *pa = &a; // the pointer

pa; // is the value of the pointer

*pa; // is the value of the object

Now, create a pointer to a pointer to an object

int a; // the object

int *pa = &a; // the first pointer

int **paa = pa; // the second pointer

a; // is the value of the object

pa; // is the value of the first pointer

*pa; // is the value of the object using the first pointer

*paa; // is the value of the second pointer

**paa; // is the value of the object using the second pointer

And so on and so forth... Just don't forget to initialize each pointer along the way!

001
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0

Related Questions


As the name suggests Pointer is used to point towards something ,here in this case it points to another variable and stored at a memory location. Pointer is a variable that stores address of another variable. Different Types of pointers are: 1)Dangling Pointers 2)NULL Pointers 3)This Pointer 4)Generic Pointer 5)Near Pointer 6)Far Pointer

Pointer is simply a variable that stores the memory address of another variable. Pointer to pointer means double pointer ,pointer that points to another pointer variable.

pointer is the variable that holds the address of another variable

When a variable is declared as being a pointer to type void it is known as a generic pointer. Since you cannot have a variable of type void, the pointer will not point to any data and therefore cannot be dereferenced. It is still a pointer though, to use it you just have to cast it to another kind of pointer first. Hence the term Generic pointer.

A pointer only holds an address information (location) in the memory. if a pointer holds points another pointer then it is a pointer to an other pointer. Pointer holds an address in the memory so in that address there is an other location information that shows another location.

A pointer is a variable which is used to store address of a variable. They are used to point to another variable.eg:-int *p; // creates a pointer of integer typeint num; // an integer variablep=# //pointer variable p is assigned with address of num

'This' is a keyword that is it is previously defined in the library. It is Used with this pointer to point to another variables memory address.

The two pointer stars point to Polaris, the north star

A Pointer is a Variable that holds a memory address, usually the location of another variable in memory. A pointer to pointer is known as double pointer.

void is type of pointer that usually means that you can make it point to any data type. When you make a pointer point to somewhere its data type should match with the place where you want it to point. When you dont know the data type where it will point to then you can declare a void pointer and make it point to the data type it want.

Pointer is a variable that stores the address of another variable . So pointer basically stores the address of another variable and size of pointer can be evaluated by using sizeof operator.

Pointer is a variable that is used to store the memory address of another variable. There are differenr types of pointers: NULL pointer THIS pointer VOID pointer NEAR pointer HUGE pointer FAR pointer WILD pointer

In normal Internet browsing and scrolling through a page, the mouse pointer appears as an arrow. However, when you point to a hyperlink, the mouse pointer appears as a hand.

1 pointer-free throw 2 pointer-shot made within the 3 point line 3 pointer-shot made behind the 3 point line

A pointer is an object that contains the address of another object, hence the term pointer, meaning that one object points to another.

generic pointer is a pointer that can not be dereferenced i.e one type pointer can not be assigned to another type.

The link selector pointer displays a pointing hand when you point to a hyperlink.

Pointer is a variable that stores the address of another variable. Since pointer is also akind of variable, thus pointer itself will be stored at a different memory location.

A cell pointer in excel is just the cell where you point the cursor in which its row and column can be seen is called a cell pointer.

If you are standing behind the three point line, the arc going around the hoop, it is a three-pointer. Any other shot is a two-pointer.

Pointer is a variable, A variable that stores the address of another variable. Size of a pointer is 2 bytes.

Merak and Dubhe, often referred to as the pointer stars, point to Polaris, which many people know as the North Star.

pointer r the variables created in RAM which store the address of a another variable

A pointer variable holds the address of a location in memory. But if the pointer hasn't been given a valid address, you can't dereference it. or A pointer that does not point to any data object.

if you have your foot on the 3 point line or forward, its a 2 pointer. Beyond the ark , its a 3 pointer


Copyright ยฉ 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.