go 04-zero-values

Which type's zero value is 0? bool pointer string all numeric types CORRECT Which type's zero value is false? bool CORRECT pointer string all numeric types Which type's zero value is ""? bool pointer
阅读全文

go QUESTIONS: What's a variable?

QUESTIONS: What's a variable? Where does a variable live? Hard Disk Computer Memory - CORRECT CPU What do you use a variable's name for? To be able to access it later - CORRECT It's just a label I don
阅读全文

go 02-declaration

Which statement do you need to use for declaring variables? name int vars string name var name integer var width int CORRECT Which sentence below is correct? You can use a variable before declaring it
阅读全文

go Declare and Print Variables

Declare and Print Variables Warm up. Declare a few variables and get some experience. Get used to the variable declaration syntax. Declare int Declare bool Declare float64 Declare string Declare undec
阅读全文

go questions

Which one below is an integer literal? -42 CORRECT This is an integer literal "Hello" This is a string literal false This is a bool constant 3.14 This is a float literal Which one below is a float lit
阅读全文

go exercises

Print the literals Print a few values using the literals Print hexes (optional exercise) Print numbers in hexadecimal
阅读全文

go questions

Which is a correct declaration? var int safe := 3 var safe bool := 3 safe := true CORRECT Which is a correct declaration? var short := true int num := 1 speed := 50 CORRECT num int := 2 Which is a cor
阅读全文

go Short Declare

Short Declare Time to declare a few variables using the short declaration syntax. You'll also use the redeclaration and discarding. Short Declare Multiple Short Declare Multiple Short Declare #2 Short
阅读全文

go 03-comments

Why do you need to use comments sometimes? To combine different expressions together To provide explanations or generating automatic documentation for your code CORRECT To make the code look nice and
阅读全文