Add pointer and password app

This commit is contained in:
Archer Fox
2025-03-01 22:20:45 +03:00
parent 1b71b5e8e3
commit 850430b62e
3 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package pointers
import "fmt"
func main() {
a := 5
pointerA := &a
double(&a)
fmt.Println(*pointerA) // Дереференс (разыменование) указателя
fmt.Println(a)
}
func double(num *int) {
*num = *num * 2
}