1.

Is it possible to declare variables of different types in a single line of code in Golang?

Answer»

Yes, this can be achieved by writing as SHOWN below:

var a,B,C= 9, 7.1, "interviewbit"

Here, we are assigning VALUES of a type Integer NUMBER, Floating-Point number and string to the three variables in a single line of code.



Discussion

No Comment Found