Loading…
40+ curated questions with the same answer shape every time: quick recap, deep dive, pitfalls, and follow-ups. Coverage includes string immutability, rune vs byte, string iteration, strings package, and more.
Suggested path
Topics follow a teaching order. Each answer ends with a clear Next question control so you can move forward without hunting the list.
Strings in Go work differently from Python or Java, and every fresher interview includes at least one string question. This module covers string immutability in Go (a string is a read-only slice of bytes — you cannot modify it in place), the distinction between byte (uint8, raw bytes) and rune (int32, a Unicode code point — ranging over a string with range gives runes, not bytes), safe string iteration with range (iterates runes), the strings package for common operations (strings.Contains, strings.Split, strings.TrimSpace, strings.Builder for efficient concatenation), strconv for converting between strings and numbers (strconv.Atoi, strconv.Itoa, strconv.ParseFloat), explicit type conversion with T(x) syntax (Go has no implicit numeric conversions), and type assertions for interface values. The gotcha question: 'why does len("café") return 5 instead of 4?' — this module answers it and explains why.
Full catalog
Topics are ordered for learning. Within each topic, rows are numbered 1–40 globally so you always know where you are. Collapse topics if you want a lighter view — use Expand all when you need the full list again.
Numbers 1–40 follow the order we recommend — click any row to open the full answer, or use the sticky Next link at the bottom of each page to go Q1 → Q40.