메뉴 건너뛰기

Hello :0

[Go] Memory address sample

2016.09.06 13:34

Leekyu 조회 수:117

// gomory project gomory.go
package main

import "fmt"

func main() {
 var name string = "Hello, 世界"
 fmt.Println(name)

 fmt.Printf("0x%08x ", &name)

 for i := 0; i < len(name); i++ {
  fmt.Printf("%02x ", name[i])
 }
}