Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is default value of a global variable in go?



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

Post New Answer

More Go Programming Language Interview Questions

Why type assertion is used in go language?

1 Answers  


How you to access command line arguments passed to a go program?

1 Answers  


What are the several built-in supports in go?

1 Answers  


Explain the syntax for 'for' loop.

1 Answers  


What is the usage of goto statement in go programming language?

1 Answers  


What is a string literal?

1 Answers  


Does go (golang) support pointer arithmetic?

1 Answers  


What is type “bool” default value?

1 Answers  


What do you know about modular programming?

1 Answers  


Explain dynamic type declaration of a variable in go programming language?

1 Answers  


What is the default value of type bool in go programming?

1 Answers  


How to define a structure in go programming language?

1 Answers  


Categories