-
1.
Can you declared multiple types of variables in single declaration in Go?
true
false
Answer
-
2.
Which of the following is true about Go programming language?
Go is a general-purpose language designed with systems programming in mind.
It is strongly and statically typed, provides inbuilt support for garbage collection.
It supports concurrent programming.
All of the above.
Answer
-
3.
You can have any number of case statements within a select statement in Go.
true
false
Answer
-
4.
In Go language, variables of different types can be declared in one statement.
true
false
Answer
-
5.
Go supports method overloading.
true
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?
break
continue
goto
None of the above.
Answer
-
7.
Which of the following is correct about maps in Go?
delete() function is used to delete an entry from the map.
delete() function requires map and corresponding key which is to be deleted.
Both of the above.
None of the above.
Answer
-
8.
Which of the following is correct about nil pointer in Go?
Go compiler assign a Nil value to a pointer variable in case you do not have exact address to be assigned.
Nil value assignment is done at the time of variable declaration.
A pointer that is assigned nil is called a nil pointer.
All of the above.
Answer
-
9.
Which of the following is true about call by reference method of parameter passing in Go?
This method copies the address of an argument into the formal parameter.
Inside the function, the address is used to access the actual argument used in the call.
Changes made to the parameter affect the argument.
All of the above.
Answer
-
10.
Which of the following is true about for loop statement in Go?
if condition is available, then for loop executes as long as condition is true.
if range is available, then for loop executes for each item in the range.
Both of the above.
None of the above.
Answer
-
11.
Which of the following is not a floating type in Go?
float128
complex64
complex128
All of the above.
Answer
-
12.
Does Go support pointer arithmetics?
yes
no
Answer
-
13.
The term rvalue refers to a data value that is stored at some address in memory.
true
false
Answer
-
14.
In Go language, a function/variable is exported if its name starts with capital letter.
true
false
Answer
-
15.
Go supports pointer arithmetics.
true
false
Answer
-
16.
Which of the following transfers control to the labeled statement in Go?
break
continue
goto
None of the above.
Answer
-
17.
Which of the following is correct about maps in Go?
Go provides another important data type map which maps unique keys to values.
A key is an object that you use to retrieve a value at a later date.
Both of the above.
None of the above.
Answer
-
18.
Which of the following is correct about slice in Go?
Go Slice is an abstraction over Go Array.
It provides many utility functions required on Array and is widely used in Go programming.
To define a slice, you can declare it as an array without specifying size or use make function to create the one.
All of the above.
Answer
-
19.
Method are special functions with a receiver in Go.
true
false
Answer
-
20.
Which of the following operator gives remainder of after an integer division in Go?
^
%
$
None of the above.
Answer