0 votes
in GoLang by
What is a pointer in Go?

1 Answer

0 votes
by

A pointer is used to 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.

...