Katipunero-
Eternal Poster
- Joined
- Mar 22, 2020
- Posts
- 790
- Reaction
- 318
- Points
- 312
Para din sa mga nalilito, share ko tong ginawa kong simple explanation para magets yung logic and usage nila.
Go playground: You do not have permission to view the full content of this post. Log in or register now.
Code:
package main
import "fmt"
func main() {
name := "PHCorner" // Simpleng string variable.
fmt.Println("string variable name:", name)
p := &name // Nasa akin ang RAM address ni variable name.
fmt.Println("RAM Address:", p)
dp := *p // Hawak ko ang value ng owner ni Ram Address na hawak ni p.
fmt.Println("Dereference Pointer:", dp)
}
Go playground: You do not have permission to view the full content of this post. Log in or register now.