Data type defines a set of related values, describe the operations that can be done on them and define the way the stored in memory. For example: Suppose you have a Car of VW Polo, but a car can be of any other company with some other basic and some advanced features. But if we called a name Car, then in your mind a picture is created that there is a vehicle with 4-wheels and steering. Each car has some features like the color, company, make, model etc. Types in programming work in a similar way, For example, "Hello World" is a string and every string have some length. Numbers Go Comes with different types to represent numbers, Numbers can be categorized into two broad categories... Integer The integer represents only those numbers which don't include any decimal places and can be of any positive and negative numbers. Example : {1, 3, -4, 11, 123, 534} all are integer numbers Go's integer type can be uint8, uint16, uint32, uint64, int8, int16, in
Comments