Go quiz questions

Go interview questions

  • 1.

    Can you declared multiple types of variables in single declaration in Go?

    1. true

    2. false

    Answer
  • 2.

    Which of the following is true about Go programming language?

    1. Go is a general-purpose language designed with systems programming in mind.

    2. It is strongly and statically typed, provides inbuilt support for garbage collection.

    3. It supports concurrent programming.

    4. All of the above.

    Answer
  • 3.

    You can have any number of case statements within a select statement in Go.

    1. true

    2. false

    Answer
  • 4.

    In Go language, variables of different types can be declared in one statement.

    1. true

    2. false

    Answer
  • 5.

    Go supports method overloading.

    1. true

    2. false

    Answer
  • 6.

    Which of the following causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating in Go?

    1. break

    2. continue

    3. goto

    4. None of the above.

    Answer
  • 7.

    Which of the following is correct about maps in Go?

    1. delete() function is used to delete an entry from the map.

    2. delete() function requires map and corresponding key which is to be deleted.

    3. Both of the above.

    4. None of the above.

    Answer
  • 8.

    Which of the following is correct about nil pointer in Go?

    1. Go compiler assign a Nil value to a pointer variable in case you do not have exact address to be assigned.

    2. Nil value assignment is done at the time of variable declaration.

    3. A pointer that is assigned nil is called a nil pointer.

    4. All of the above.

    Answer
  • 9.

    Which of the following is true about call by reference method of parameter passing in Go?

    1. This method copies the address of an argument into the formal parameter.

    2. Inside the function, the address is used to access the actual argument used in the call.

    3. Changes made to the parameter affect the argument.

    4. All of the above.

    Answer
  • 10.

    Which of the following is true about for loop statement in Go?

    1. if condition is available, then for loop executes as long as condition is true.

    2. if range is available, then for loop executes for each item in the range.

    3. Both of the above.

    4. None of the above.

    Answer
  • 11.

    Which of the following is not a floating type in Go?

    1. float128

    2. complex64

    3. complex128

    4. All of the above.

    Answer
  • 12.

    Does Go support pointer arithmetics?

    1. yes

    2. no

    Answer
  • 13.

    The term rvalue refers to a data value that is stored at some address in memory.

    1. true

    2. false

    Answer
  • 14.

    In Go language, a function/variable is exported if its name starts with capital letter.

    1. true

    2. false

    Answer
  • 15.

    Go supports pointer arithmetics.

    1. true

    2. false

    Answer
  • 16.

    Which of the following transfers control to the labeled statement in Go?

    1. break

       

    2. continue

    3. goto

    4. None of the above.

    Answer
  • 17.

    Which of the following is correct about maps in Go?

    1. Go provides another important data type map which maps unique keys to values.

    2. A key is an object that you use to retrieve a value at a later date.

    3. Both of the above.

    4. None of the above.

    Answer
  • 18.

    Which of the following is correct about slice in Go?

    1. Go Slice is an abstraction over Go Array.

    2. It provides many utility functions required on Array and is widely used in Go programming.

    3. To define a slice, you can declare it as an array without specifying size or use make function to create the one.

    4. All of the above.

    Answer
  • 19.

    Method are special functions with a receiver in Go.

    1. true

    2. false

    Answer
  • 20.

    Which of the following operator gives remainder of after an integer division in Go?

    1. ^

    2. %

    3. $

    4. None of the above.

    Answer

© 2017 QuizBucket.org