Go Variables

In this tutorial you will learn about the Go Variables and its application with practical example.

Go Variables

Variables are used to represent reserved memory locations that is used to store values, when we create a variable we are a suppose to allocate some memory space for that variable. Go is a statically typed programming language. This means that variables always have a specific type associated with it and that cannot be change. Data type for a variable specifies following-

Table Of Contents
  • The amount of memory space allocated for variables.
  • A data type specifies the possible values for variables.
  • The operations that can be performed on variables.

Syntax :-

Below is syntax to declare a variable in GoLang –

or

Example :-

Output :-

Screenshot_823

 

 

 

In this tutorial we have learn about the Go Variables and its application with practical example. I hope you will like this tutorial.