@kjk1/

book pointers basics

Go

No description

fork
loading
Files
  • main.go

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8515165557035926","path":"main.go","file":{"path":"main.go","content":{"asEncoding":{"base64":"cGFja2FnZSBtYWluCgppbXBvcnQgImZtdCIKCmZ1bmMgbWFpbigpIHsKCS8vIDpzaG93IHN0YXJ0Cgl2YXIgYSBpbnQgPSA0CglwYSA6PSAmYQoJZm10LlByaW50ZigiQWRkcmVzcyBvZiBhIHZhcmlhYmxlIGluIG1lbW9yeSBpcyAlcC4gSXRzIHZhbHVlIGlzOiAlZFxuIiwgcGEsICpwYSkKCS8vIDpzaG93IGVuZAp9"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
package main

import "fmt"

func main() {
	// :show start
	var a int = 4
	pa := &a
	fmt.Printf("Address of a variable in memory is %p. Its value is: %d\n", pa, *pa)
	// :show end
}