PRACTICE / UNDERSTAND / REPEAT

Go practice question

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

1 questionAnswers explainedFree · no login

Try this question

Pointers · MCQQuestion link ↗

What happens when dereferencing a nil pointer in ordinary Go code?

Choose one answer
Answer & explanation

Answer: A runtime panic

Nil pointers do not designate valid storage for dereferencing.