EPUB+ Adds two operands - Subtracts the second operand from the first one * Multiplies both operands / Divides the first operand from the second one % Returns remainder on dividing the first operand from the second one ++ Increments integer/float value by one -- Decrements integer/float value by one Table 5.1: Arithmetic operators Example: var a int = 12 var b int = 3 fmt.Println("ex. of '+' operator:", a+b) // ex. of ‘+’ operator: 15 fmt.Println("ex. of '-' operator:", a-b) // ex. of ‘-’ operator: 9 fmt.Println("ex. of '*' operator:", a*b) // ex. of ‘*’ operator: 36 fmt.Println("ex. of '/' operator:", a/b) // ex. of ‘/’ operator: 4 fmt.Println("ex. of '%' operator:", a%b) // ex. of ‘%’ operator: 0 a++; fmt.Println("ex. of '++' operator:", a) // ex. of ‘++’ unary operator: 13 b--; fmt.Println("ex. of '--' operator:", b) // ex. of ‘--’ unary operator: 2 • Relational operator: Relational operators stabilize a relation between two entities, divided on the basis of equality or inequalities. They always work between two operands. These operators are mainly used as conditions that provide a Boolean result. Here are some of the types of relational operators that we have in the Go language: Operator Description == Returns true if the value of two operands is same. != Returns true if both operands have different values. Returns true if the value of the first operand is greater than the value o
Rate this eBook
| File Name: | 43e89c1328192aa50ade908123b8775a.epub |
| Original Title: | Learning Go Programming - 2nd Edition |
| Creator / Author: | Agarwal, Shubhangi; |
| Language: | English (en) |
| Identifier: | ASIN:331011 |
| Publisher: | Agarwal, Shubhangi; Publishing |
| Category: | Computer Science & Programming |
| Format: | 📗 EPUB eBook |
| File Size: | 3.5 MB |
-2.jpeg)

-12.jpeg)

-1.jpeg)