Skip to content

Instantly share code, notes, and snippets.

@hygull
Created December 5, 2016 16:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hygull/89b669fdeb11279e50da183ac4d8c398 to your computer and use it in GitHub Desktop.
Save hygull/89b669fdeb11279e50da183ac4d8c398 to your computer and use it in GitHub Desktop.
Pointer and memory allocation created by hygull - https://repl.it/Eg23/0
/*
@Date of creation : 05 Dec 2016.
@Aim of program : To allocate storage for data of type int8 using pointer.
@Coded by : Rishikesh Agrawani.
*/
package main
import "fmt"
func main() {
num1:=new(int8)
fmt.Println(num1)
*num1=10;
fmt.Println(num1)
fmt.Println(*num1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment