Google News
logo
Golang - Quiz(MCQ)
A)
1996
B)
2001
C)
2005
D)
2007

Correct Answer :   2007


Explanation : “Go, also commonly referred to as golang, is a programming language developed at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.

A)
Apple
B)
Facebook
C)
Google
D)
Microsoft

Correct Answer :   Google


Explanation :

Go is an open source, strongly typed, compiled language written to build concurrent and scalable software. The language was invented at Google by Rob Pike, Ken Thomson, and Robert Griesemer.
 
Golang was designed by Google engineers and is often used there for internal projects. Google Chrome and Google Earth were created in this way. It is also used in YouTube and Google App Engine.

A)
Rob Pike, Ken Thomson and Robert Griesemer
B)
Dennis Ritchie, Eric Schmidt and Brian Kernighan
C)
Robert Griesemer, David Drummond and Alan Mulally
D)
Ken Thomson, Patrick Pichette and Bjarne Stroustrup

Correct Answer :   Rob Pike, Ken Thomson and Robert Griesemer

A)
pkg contains package objects
B)
src contains GO source files organized into packages
C)
Both (A) and (B)
D)
None of the Above

Correct Answer :   Both (A) and (B)

A)
Under the directory of your project place the directory with library files
B)
Refer to the library using its path relative to the root of your workspace consisting the project
C)
Both (A) and (B)
D)
None of the Above

Correct Answer :   Both (A) and (B)

A)
Go
B)
Flex
C)
Django
D)
Cassendra

Correct Answer :   Go


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

A)
Compilation time is fast.
B)
InBuilt concurrency support
C)
Support for Interfaces and Type embdding
D)
All of the Above

Correct Answer :   All of the Above

A)
Yes
B)
No
C)
None of the Above
D)
--

Correct Answer :   Yes

A)
call by value
B)
call by reference
C)
Both (A) and (B)
D)
None of the Above

Correct Answer :   call by reference

A)
Parameters
B)
Function Name
C)
Return Type
D)
All of the Above

Correct Answer :   All of the Above

A)
The size of an array is part of its type. The types [10] int and [20] int are distinct
B)
If you pass an array to a function, it will receive a copy of the array, not a pointer to it
C)
Both (A) and (B)
D)
All of the Above

Correct Answer :   All of the Above

A)
Goto
B)
Jump
C)
Enum
D)
return

Correct Answer :   Goto

A)
Go support method overloading
B)
Go support pointer arithmetics
C)
Go is a case sensitive programming language
D)
Go support operator overloading

Correct Answer :   Go is a case sensitive programming language


Explanation : Yes! Go is a case sensitive programming language and all other are not true.

A)
Yes
B)
No
C)
None of the Above
D)
--

Correct Answer :   No

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

Correct Answer :   All of the Above

A)
uint8
B)
uint64
C)
complex128
D)
All of the above

Correct Answer :   complex128

A)
Global variables are defined outside of a function, usually on top of the program.
B)
The global variables will hold their value throughout the lifetime of your program.
C)
A global variable is available for use throughout your entire program after its declaration.
D)
All of the Above

Correct Answer :   All of the Above

A)
With maps, it returns the key of the next key-value pair.
B)
With array and slices, it returns the index of the item as integer.
C)
The range keyword is used in for loop to iterate over items of an array, slice, channel or map.
D)
All of the Above

Correct Answer :   All of the Above

A)
It is designed by Google
B)
Golang is syntactically similar to Java
C)
It is statically typed programming language
D)
None of the Above

Correct Answer :   Golang is syntactically similar to Java

A)
Type casting
B)
GoMap
C)
GoCast
D)
Interface

Correct Answer :   Type casting


Explanation : Type casting is a way to convert a variable from one data type to another data type.

A)
Each package has a path and name associated with it.
B)
It is a must statement as Go programs runs in packages.
C)
The first line of the program package defines the package name in which a Go program should lie.
D)
All of the Above

Correct Answer :   All of the Above

A)
drop()
B)
remove()
C)
delete()
D)
truncate()

Correct Answer :   delete()


Explanation : delete() function is used to delete an entry from the map. It requires map and corresponding key which is to be deleted.

A)
True
B)
False
C)
None of the Above
D)
--

Correct Answer :   False

A)
True
B)
False
C)
None of the Above
D)
--

Correct Answer :   True

25 .
What is the output of the following code snippet?
package main
  import ("fmt")
  func main() {
   x := 3
   y := &x
  fmt.Print(*y)
   *y = 4
 fmt.Println(x)
}
A)
34
B)
43
C)
44
D)
Code Error

Correct Answer :   34

A)
True
B)
False
C)
None of the Above
D)
--

Correct Answer :   False

A)
size()
B)
cap()
C)
len()
D)
None of the Above

Correct Answer :   len()

A)
delete() function is used to delete an entry from the map.
B)
delete() function requires map and corresponding key which is to be deleted.
C)
Both (A) and (B)
D)
None of the Above

Correct Answer :   Both (A) and (B)

A)
Goto
B)
Break
C)
Both (A) and (B)
D)
Continue

Correct Answer :   Continue

A)
True
B)
False
C)
None of the Above
D)
--

Correct Answer :   True