0 votes
in GoLang by
What form of type conversion does Go support? Convert an integer to a float.

1 Answer

0 votes
by

Go supports explicit type conversion to satisfy its strict typing requirements.

i := 55      //int

j := 67.8    //float64

sum := i + int(j) //j is converted to int

...