1.

What Is A Pointer?

Answer»

It's a POINTER variable which can hold the address of a variable.

For EXAMPLE

var x = 5
var p *int
p = &x
fmt.Printf("x = %d", *p)
Here x can be accessed by *p.

It's a pointer variable which can hold the address of a variable.

For example −

var x = 5
var p *int
p = &x
fmt.Printf("x = %d", *p)
Here x can be accessed by *p.



Discussion

No Comment Found