data type in golang
Variables can be of different types like int, float, struct, slice or it can be of the interface.
The general form for declaring a variable uses the keyword var:
Syntax:-
var identifier type
Example data type in go programming:
package main
import "fmt"
func main(){
var x int
x=21
fmt.Println(x)
}
No comments:
Post a Comment