1.

What Is Type Casting In Go?

Answer»

Type casting is a way to convert a variable from one data type to another data type. For EXAMPLE, if you want to store a long value into a simple INTEGER then you can type cast long to int. You can convert VALUES from one type to another using the cast OPERATOR as following:

type_name(expression)

Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a long value into a simple integer then you can type cast long to int. You can convert values from one type to another using the cast operator as following:

type_name(expression)



Discussion

No Comment Found