Go Miscellaneous Operators And Operator Precedence

Go Language - Miscellaneous Operators and Operator Precedence

Miscellaneous Operators :

go-language-miscellaneous-operators

Example :

CODE/PROGRAM/EXAMPLE
package main
import "fmt"
func main() {	//example of & and * operators 
var a int = 6
var ptr *int
ptr = &a	/* ptr has the address of a*/
fmt.Printf("value of a is  %d\n", a);
fmt.Printf("*ptr is %d.\n", *ptr);
}

Output:
value of a is 6
*ptr is 6.

Operator Precedence :

Operator Precedence identifies the clustering of terms in expression and it affects the evaluation of the expression. Each operator has the precedence over the other operators. The operators with the highest precedence will be executed first.

go-language-operator-precedence
#Go_Language_Miscellaneous_Operators #golang_Miscellaneous_Operators #golang_Operator_Precedence #go_language_Operator_Precedence #golang_Operator_Precedence_example #go_language_Operator_Precedence_example

(New page will open, for Comment)

Not yet commented...