Golang Interview Questions Part 1 Theory Top 50 Question
Most Frequently asked golang interview Questions
( Based on the real interview experience)
for Fresher 0-1 year experience.
- Why Golang
--> For its Simplicity, Build in Concurrency Support and Super Scalable. - What is Goroutine
--> Goroutine is like a thread in java, it's lightweight than a thread useful to achieve concurrency in Go. https://golangbot.com/goroutines/ - How to communicate between goroutines?
--> By Using Channels we can communicate between Goroutines. - What is mutex?
-- > https://golangbot.com/mutex/ - What is synchronization in go
--> https://golang.org/pkg/sync/ - How to achieve concurrency in Go
--> By Using Goroutines. - What is Channels in go?
--> https://golangbot.com/channels/ - What are the Types of Channels?
--> https://golangbyexample.com/channel-golang/ - What is Buffered Channel and Unbuffered Channel explain?
--> https://golangbot.com/channels/ - How to avoid deadlock in a goroutine?
--> https://www.geeksforgeeks.org/golang-deadlock-and-default-case-in-select-statement/ - How Goroutines Works?
--> https://golangbyexample.com/goroutines-golang/ - What is a method in Go?
--> https://medium.com/rungo/anatomy-of-methods-in-go-f552aaa8ac4a - What is the anonymous function?
--> https://www.geeksforgeeks.org/anonymous-function-in-go-language/ - What is the Variadic function?
--> https://www.geeksforgeeks.org/variadic-functions-in-go/ - Explain Slices in Go in detail how they differ from another language?
--> https://golangbyexample.com/slice-in-golang/ - What is Closures in go?
--> https://www.geeksforgeeks.org/closures-in-golang/ - What is an interface in Go?
--> https://golangbyexample.com/interface-in-golang/ - Go is Object-Oriented Langauge?
--> No - Explain the OOPs concept.
--> https://www.youtube.com/watch?v=pTB0EiLXUC8
https://golangbyexample.com/tag/oop/ - How to create a basic server in Go?
--> https://gobyexample.com/http-servers - What are the basic data structures in Go?
--> https://medium.com/@victorsteven/understanding-data-structures - What is reflection
--> https://golangbot.com/reflection/ - What is byte [] slice
--> https://medium.com/@tyler_brewer2/bits-bytes-and-byte-slices-in-go - How to create a Public/Private function in go (Access modifier in Go?)
--> We use Capital name(First Char Capital) for the function to make it Public and small letter for Private function. - Does go function return multiple values?
--> Yes, https://www.geeksforgeeks.org/golang-program-that-uses-multiple-return-values/ - Difference between concurrency and Parralism?
--> https://golangbot.com/concurrency/ - What is a map in go?
--> https://medium.com/rungo/the-anatomy-of-maps-in-go-79b82836838b - Difference between new and make?
--> https://dave.cheney.net/2014/08/17/go-has-both-make-and-new-functions-what-gives - What is Worker Pool and WaitGroup?
--> https://golangbot.com/buffered-channels-worker-pools/ - How map prints data
--> https://golangbyexample.com/different-ways-iterating-over-map-go/ - What is a rune?
--> https://www.bogotobogo.com/GoLang/GoLang_byte_and_rune.php - How Append function Works?
--> https://yourbasic.org/golang/append-explained/ - What is the REST API?
--> https://www.smashingmagazine.com/2018/01/understanding-using-rest-api/
https://dev.to/moficodes/build-your-first-rest-api-with-go-2gcj - What is Middleware?
--> https://www.redhat.com/en/topics/middleware/what-is-middleware - What is microservices?
--> https://www.redhat.com/en/topics/microservices/what-are-microservices - How to handle error in go?
--> https://medium.com/rungo/error-handling-in-go-f0125de052f0 - What is the Defer keyword?
--> https://golangbot.com/defer/ - What is Recover?
--> https://golangbot.com/panic-and-recover/ - Difference between function and method?
--> https://www.sohamkamani.com/golang/functions-vs-methods/ - What is the empty interface?
--> https://dev.to/flrnd/understanding-the-empty-interface-in-go-4652 - What is a struct type?
--> https://golangbyexample.com/struct-in-golang-complete-guide/ - What is Enum in go?
--> https://blog.learngoprogramming.com/golang-const-type-enums-iota-bc4befd096d3 - What is Go Module?
--> go-modules - How to manage dependency in Go?
--> https://golangbyexample.com/packages-modules-go-first/ - What is Packages in go?
--> https://medium.com/rungo/everything-you-need-to-know-about-packages-in-go - What is Select in go?
--> https://golangbyexample.com/select-statement-golang/ - What is IOTA?
--> https://golangbyexample.com/iota-in-golang/ - What is panic in go how to handle it?
--> https://www.digitalocean.com/community/tutorials/handling-panics-in-go - Do you know net/http package?
--> https://codegangsta.gitbooks.io/building-web-apps-with-go/content/http_basics/index.html - What is JSON Encoding and Decoding?
--> https://yourbasic.org/golang/json-example/
In the next article Part 2 we will see coding interview question.
https://gophersgo.blogspot.com/2021/01/golang-interview-questions-part-2.html
Thanks for reading, keep Go'ing.
Recently I was asked about "what is Context" and how we are using it. Maybe it's worth while to put this on the list.
ReplyDeleteWhat is the answer so?
DeleteThank you @slav , noted, will update article along with your question.
ReplyDeleteI'm really impressed with your writing skills, as smart as the structure of your weblog.
ReplyDeleteGoLand Full Crack
Waves v12 Complete Crack