You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Pointer is just the reference to the memory address since you're directly passing on to that address it makes a 100% guarantee that actual value is passed on.
package main
import (
"fmt"
)
func main() {
// var ptr *int
// fmt.Println("The actual number of pointer is: ", ptr)
myNumber := 35
// For reference to the memory address we use "&" this
var ptr = &myNumber
fmt.Println("For printing the actual value of pointer here is: ", ptr)
fmt.Println("For printing the actual value of pointer here is: ", *ptr)