Courses
Go for Beginners: Write Reliable Programs and Small Services
Check Yourself
Five scenario questions on zero values, short variable declarations, range loops, and multiple return values.
Course content
Join this Course
Sign in to save your progress.
-
Before You Write Code
-
Why Go Exists and When to Pick It
-
Run Your First Go Program
-
-
-
Values, Control Flow, and Functions
-
Variables, Types, and Zero Values
-
If, For Loops, and Multiple Return Values
-
-
-
Slices, Maps, and Structs
-
Arrays, Slices, and Why append Matters
-
Maps, Structs, and Pointer Receivers
-
-
-
Errors, Packages, and Testing
-
Handle Errors Without Hiding Them
-
Packages, Exports, and go test
-
-
-
Files, JSON, and a Small HTTP Server
-
Read Files and Decode JSON Structs
-
Build and Test a Small net/http Server
-
-
-
Pointers, Modules, and CLIs
-
Pointers and Memory Basics
-
Managing Dependencies and internal/ Packages
-
Building CLIs With flag, os.Getenv, and Exit Codes
-
-
1.
You declare `var active bool` and `var count int` inside a function without assigning values. What do they hold?
2.
Why does `len("São Paulo")` return 10 when the string has 9 visible characters?
3.
You write `for item := range items { fmt.Println(item) }` on a slice of strings `items := []string{"a", "b"}`. What prints?
4.
Where is short variable declaration `port := 8080` allowed in a Go file?
5.
A helper function `parsePort(raw string) (int, error)` rejects an out-of-range port. What is the idiomatic return?
About
Five scenario questions on zero values, short variable declarations, range loops, and multiple return values.
- Duration
- 5 min
- Last update
- 11/27/2026
Was this helpful?
0
0
Comments
Sign in to commentNo comments yet.