
Go Pointer Programs with Output: Swap, nil Checks and new()
Go pointer programs work with memory addresses, which let a function change a value that lives somewhere else. Pointers sound scary, but in Go…
Tag

Go pointer programs work with memory addresses, which let a function change a value that lives somewhere else. Pointers sound scary, but in Go…

Go struct programs group related data into one type, such as an employee with a name, salary and department, or an order with items…

Go recursion programs solve a problem by having a function call itself on a smaller version of the same problem. Recursion makes some tasks,…

Go function programs show how to break code into small, reusable pieces, which is the first step from short scripts to real applications. In…

Go matrix programs work with rows and columns of numbers, like a spreadsheet, a game board or the pixels of an image. In this…

Go map programs store data as key-value pairs, such as a product code and its price or a word and how often it appears.…

Go searching programs find a value in a collection, such as an order ID in a list or a word in a dictionary. In…

Go sorting programs put data in order, such as products by price, students by marks or names from A to Z. In this post,…

Go slice programs work with lists that can grow and shrink, which is how Go stores almost every collection, from cart items to log…

Go array programs work with a fixed-size list of values, such as the marks of five subjects or the sales of seven days. They…