Golang MCQ Questions & Answers
Golang MCQs : This section focuses on "Basics" of Golang. These Multiple Choice Questions (MCQ) should be practiced to improve the Golang skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. _____ is a general-purpose language designed with systems programming in mind.
A. Django
B. Go
C. Cassendra
D. Flex
View Answer
Ans : B
Explanation: Go is a general-purpose language designed with systems programming in mind.
2. Go was initially developed at Google in year _______ by Robert Griesemer, Rob Pike, and Ken Thompson.
A. 2005
B. 2006
C. 2007
D. 2008
View Answer
Ans : C
Explanation: Go was initially developed at Google in year 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
3. Which of the following are the benefits of using Go programming?
A. Compilation time is fast.
B. Support for Interfaces and Type embdding
C. InBuilt concurrency support
D. All of the above
View Answer
Ans : D
Explanation: All of the above are benefits of Go language.
4. Does Go support type inheritance?
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, Go support type inheritance.
5. Which of the following is true?
A. Go support operator overloading
B. Go support method overloading
C. Go is a case sensitive programming language
D. Go support pointer arithmetics
View Answer
Ans : C
Explanation: Yes! Go is a case sensitive programming language and all other are not true.
6. _______ is a way to convert a variable from one data type to another data type.
A. Interface
B. GoMap
C. GoCast
D. Type casting
View Answer
Ans : D
Explanation: Type casting is a way to convert a variable from one data type to another data type.
7. _______ function is used to delete an entry from the map.
A. delete()
B. drop()
C. remove()
D. truncate()
View Answer
Ans : A
Explanation: delete() function is used to delete an entry from the map. It requires map and corresponding key which is to be deleted.
8. Which of the following is true about packages in Go?
A. The first line of the program package defines the package name in which a Go program should lie.
B. It is a must statement as Go programs runs in packages.
C. Each package has a path and name associated with it.
D. All of the above
View Answer
Ans : D
Explanation: All of the above options are correct.
9. Which of the following is correct about slice in Go?
A. Go Slice is an abstraction over Go Array.
B. It provides many utility functions required on Array and is widely used in Go programming
C. To define a slice, you can declare it as an array without specifying size or use make function to create the one.
D. All of the above.
View Answer
Ans : D
Explanation: All of the above options are correct.
10. Does Go support generic programming
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : B
Explanation: No support for generic programming
Discussion