Hello and welcome to the golden programming language course in the television station, we talked about
competing pointers and Googling and indecision, and we want to talk about the other's point first concept.
Go pointer to point to or domino pointer, the pointer is especially bad either, so it can point to
a variable of any time even to a pointer.
Basically, this looks like a chain of pointers when we define the pointer to pointer, then the first
pointer is used to restore the actress of the second pointer.
This concept is sometimes termed as double pointers.
Hard to declare a pointer to pointer and go land the pointer to a pointer is a form of chain of pointers.
Normally, a pointer contains the address of a very.
Then we define a pointer to a coin to the first pointer contains the address of the second pointer.
Each points to the location that contains the actual value, as shown below.
A very bad that is a pointer to a pointer must be declared as such.
This is done by placing an additional asterisk in front of its name.
For example, the following statement declares a pointer to a pointer of type int.
That Peter, three, Asterix, each time when the target value is indirectly pointed to by a pointer
to a pointer, accessing that value requires that the asterisk operator be applied twice.
Now, go to this good program to illustrate the concept of pointer to pointer.
First, taking a variable of integer type that.
Peaks and equals 100.
Now, taking a pointer of the time that.
P.
T one Asterix E equals actress of East Valley, the Anderson he's
now taking pointer to pointer to Pete Yvonne is touring the actress of Pizjuan into PETA to vie Pete
to asterisk, asterisk and equals actress of Pointer Rock Anderson.
Petey won't now display EEGs and Petey and PETA variables if IFBB.
The value of X equals said the value of the Ace go to the next line.
Fifty.
The dragging you off.
He t one equals set point to a long.
And go to the next line.
If we.
The value.
Home to two equals and set the value a pointer to.
Reformat the quote.
Now referencing the pointer to pointer.
Yes, he.
Value at the address.
Of pointer to or has to expand to two equals, that's two pointer to and double pointer bequeathed the
value of variable X if P
value.
At the at risk.
Point to two or.
Asterisk, asterisk, p t two equals
six, that's p t.
To reformat the code, save the project and execute the program.
Now we can see the output first, we see the value of the variable X, which is a hundredth.
Then we see the value of the variable points or one in which the address of the variable X is a thought.
And then we see the value of the variable point or two in which the address of the variable point to
one is distort.
And now you see the address of the variable pointer two.
And finally, we see the value of the variable points or two, which is preceded by two asterisks.
We have reached the end of decision.
I hope you have taken full advantage of this station onto next session.
Goodbye.