Go Language

Go Language

Test your Go Language knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What Go keyword is used to cancel goroutines using the context package?

    • done()
    • break()
    • cancel()
    • stop()
  2. Which built-in function is used to get the length of a slice or array?

    • count()
    • len()
    • length()
    • size()
  3. How are Go programs executed?

    • Interpreted
    • Directly compiled
    • Through Go VM
    • Through JVM
  4. Which Go keyword is used to exit from a loop?

    • return
    • stop
    • break
    • exit
  5. What is the default value of a boolean variable?

    • 0
    • nil
    • FALSE
    • TRUE
  6. What does select do in Go's concurrency model?

    • Starts a goroutine
    • Waits on multiple channels
    • Blocks on one channel
    • Synchronizes all channels
  7. What is the default value of an uninitialized pointer in Go?

    • ""
    • undefined
    • nil
    • 0x00000000
  8. What is the default value of an uninitialized int variable in Go?

    • -1
    • undefined
    • 0
    • nil
  9. What is the zero value of a string in Go?

    • "0"
    • undefined
    • ""
    • null
  10. Which Go keyword is used for packages?

    • import
    • package
    • use
    • include
  11. Which package is used for routing in the Gin framework?

    • router
    • gin
    • mux
    • net/http