Subject not found.
1.

What Is A Pointer On Pointer?

Answer»

It's a pointer variable which can HOLD the address of another pointer variable. It de-refers twice to point to the data held by the DESIGNATED pointer variable.

var a int
var ptr *int
var pptr **int
a = 3000
ptr = &a
pptr = &ptr
fmt.Printf("Value AVAILABLE at **pptr = %dn", **pptr)
Therefore 'a' can be accessed by **pptr.

It's a pointer variable which can hold the address of another pointer variable. It de-refers twice to point to the data held by the designated pointer variable.

var a int
var ptr *int
var pptr **int
a = 3000
ptr = &a
pptr = &ptr
fmt.Printf("Value available at **pptr = %dn", **pptr)
Therefore 'a' can be accessed by **pptr.



Discussion

No Comment Found