PRACTICE / UNDERSTAND / REPEAT

Go: Primitive arithmetic

Practice primitive arithmetic with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

20 questionsAnswers explainedFree · no login
Question 1 of 20
Primitive arithmetic · MCQQuestion link ↗

What does Go integer division print?

fmt.Println(5 / 3)
Choose one answer
Answer & explanation

Answer: 1

With integer operands, division truncates toward zero.