Created
January 23, 2019 06:25
-
-
Save cjgiridhar/11426584d413463a76aef32035841792 to your computer and use it in GitHub Desktop.
Primitive Data Types - Byte and Rune
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
package main | |
import "fmt" | |
func main() { | |
var myChar byte = 'A' //Stores ASCII characters | |
var myUnicode rune = '♥' //Stores Unicode characters | |
fmt.Printf("%c = %d and %c = %U\n", myChar, myChar, myUnicode, myUnicode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment