Golang Quiz

Welcome to our Golang Quiz! If you’re looking to test your knowledge of the Go programming language, also known as Golang, you’ve come to the right place. Our quiz covers a wide range of topics, from Go syntax to programming concepts and best practices. Whether you’re a beginner or an experienced Go developer, our quiz will challenge you and help you hone your skills. Plus, taking our quiz is a great way to prepare for job interviews or certification exams. So, get ready to put your Go knowledge to the test and see how well you do!

55

Golang Quiz

Test your knowledge of the Go programming language with our comprehensive Golang Quiz.

1 / 30

What is the syntax of declaring slice?

2 / 30

cap() function returns the

3 / 30

In 3:26 will assign 26 to array index ____.

4 / 30

Hitting the enter key enters ___ in the code.

5 / 30

Which of the following integer data type store only positive values?

6 / 30

What will be the output of the code below? package main
import (“fmt”)
func main() {

var a = 10 + 20

fmt.Println(a)
}

7 / 30

%d means

8 / 30

What will be the output of the code below? package main
import (“fmt”)

func main() {
var arr1 = [3]int{4,3,2}
arr2 := [5]int{1,2,3,4,5}

fmt.Println(arr1)
fmt.Println(arr2)
}

9 / 30

%v is used to _____ & %T is used to ______ of argument.

10 / 30

Which of the following code will print “Hello World”?

11 / 30

Which is the valid output function in Go Lang?

12 / 30

What will be the output of the code below? package main
import (“fmt”)

func main() {
var i, j string = “Hello”,”World”

fmt.Print(i, “n”, j)
}

13 / 30

What will be the output of the code below? package main
import (“fmt”)

func main() {
const C = 1
C = 2
fmt.Println(C)
}

14 / 30

Const keyword is

15 / 30

What is the syntax of the const keyword?

16 / 30

The below code is an example of? package main
import (“fmt”)
const C = 6
func main() {
fmt.Println(C)
}

17 / 30

How many types of constants are there in Go Lang?

18 / 30

What will be the output of the code below? package main
import (“fmt”)

const A int = 1

func main() {
fmt.Println(A)
}

19 / 30

Which of the following name is in pascal’s case?

20 / 30

Which is not the correct variable name in Go lang?

21 / 30

The type keyword allows us only to use ________ variable per line.

22 / 30

The ‘:=’ can be used

23 / 30

Which of the following code will result in an output of ‘3.14’?

24 / 30

It is necessary to specify _______ in the variable keyword.

25 / 30

Which of the following code will output “John”?

26 / 30

What is the syntax of the var keyword in Go lang?

27 / 30

What will be the output of the code below? package main
import (“fmt”)

func main()
{
fmt.Println(“Hello World!”)
}

28 / 30

Which of these is not included in the Go file?

29 / 30

What is “fmt” in the code below? package main
import (“fmt”)

func main() {
fmt.Println(“Hello World!”)
}

30 / 30

Golang’s syntax is similar to which programming language?

Author

  • Barry Allen

    A Full Stack Developer with 10+ years of experience in different domain including SAP, Blockchain, AI and Web Development.

    View all posts

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.