Answer Posted / Harshit Kumar Vishnoi
The default value of a local variable in Go depends on its data type. For example, integer types like int and int8 have a default value of 0, float64 has a default value of 0.0, boolean is false, pointers are nil, structs and arrays are initialized to their zero values (which means all fields are set to their respective zero values), and interfaces and function type variables are nil.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category