Created
December 5, 2016 16:36
-
-
Save hygull/89b669fdeb11279e50da183ac4d8c398 to your computer and use it in GitHub Desktop.
Pointer and memory allocation created by hygull - https://repl.it/Eg23/0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
@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