Go Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Go. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Answer : A
Explanation
Yes! Go is a case sensitive programming language.
Q 2 - Which of the following is a derived type in Go?
Answer : D
Explanation
All of the above are derived types.
Q 3 - Which of the following operator gives remainder of after an integer division in Go?
Answer : B
Explanation
% − Modulus Operator returns remainder of after an integer division.
Q 4 - Which of the following is true about continue statement in Go?
A - continue forces the next iteration of the loop to take place, skipping any code in between.
Answer : C
Explanation
Both of the above options are correct.
Q 5 - Which of the following is correct about structures in Go?
A - To access any member of a structure, we use the member access operator (.).
B - You would use struct keyword to define variables of structure type.
Answer : D
Explanation
All of the above options are correct.
Q 6 - Which of the following function returns the total number of elements present in a slice?
Answer : B
Explanation
len() function returns the elements presents in the slice.
Q 7 - Which of the following is true about for loop in Go if for clause that is ( init; condition; increment ) is present?
Answer : D
Explanation
All of the above options are correct.
Q 8 - Which of the following method is the default method of parameter passing in Go?
Answer : A
Explanation
By default, Go uses call by value to pass arguments.
Q 9 - A static type variable declaration requires compiler to interpret the type of variable based on value passed to it.
Answer : B
Explanation
A dynamic type variable declaration requires compiler to interpret the type of variable based on value passed to it.
Q 10 - An rvalue is an expression that cannot have a value assigned to it which means an rvalue may appear on the right- but not left-hand side of an assignment.
Answer : A
Explanation
An rvalue is an expression that cannot have a value assigned to it which means an rvalue may appear on the right- but not left-hand side of an assignment.