What is default value of a global variable in go?
Answer / Syed Suhail Alam
In Go programming language, if a global variable is not explicitly initialized, it will have the zero value. For numeric types (int, float), the zero value is 0. For boolean type, the zero value is false. For strings, the zero value is "" (an empty string).
| Is This Answer Correct ? | 0 Yes | 0 No |
Why type assertion is used in go language?
How you to access command line arguments passed to a go program?
What are the several built-in supports in go?
Explain the syntax for 'for' loop.
What is the usage of goto statement in go programming language?
What is a string literal?
Does go (golang) support pointer arithmetic?
What is type “bool” default value?
What do you know about modular programming?
Explain dynamic type declaration of a variable in go programming language?
What is the default value of type bool in go programming?
How to define a structure in go programming language?