Go quiz questions

Go interview questions

  • 1.

    Which of the following is correct about lvalue expression in Go?

    1. Expressions that refer to a memory location is called "lvalue" expression.

    2. An lvalue may appear as either the left-hand or right-hand side of an assignment.

    3. Variables are lvalues and so may appear on the left-hand side of an assignment.

    4. All of the above.

    Answer
  • 2.

    Which of the following is true about dynamic type declaration of a variable in Go?

    1. A dynamic type variable declaration requires compiler to interpret the type of variable based on value passed to it.

    2. Compiler don't need a variable to have type statically as a necessary requirement.

    3. Both of the above.

    4. None of the above.

    Answer
  • 3.

    The type for a case in select statement must be the a communication channel operation.

    1. true

    2. false

    Answer
  • 4.

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

    1. true

    2. false

    Answer
  • 5.

    Go supports method overloading.

    1. true

    2. false

    Answer
  • 6.

    Which of the following terminates the for loop or switch statement and transfers execution to the statement immediately following the for loop or switch in Go?

    1. break

    2. continue

    3. goto

    4. None of the above.

    Answer
  • 7.

    Which of the following function can be used to copy a slice to another slice in Go?

    1. append()

    2. copy()

    3. resize()

    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.

    Can a Go function be created on the fly and used as values?

    1. true

    2. false

    Answer
  • 10.

    Which of the following is true about select statement in Go?

    1. You can have any number of case statements within a select. Each case is followed by the value to be compared to and a colon.

    2. The type for a case must be the a communication channel operation.

    3. When the channel operation occured the statements following that case will execute.No break is needed in the case statement.

    4. All 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.

    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

© 2017 QuizBucket.org