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

Related questions

0 votes
asked Aug 19, 2022 in GoLang by john ganales
0 votes
asked Aug 19, 2022 in GoLang by john ganales
...