Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGoreflection basicsSingle-choice MCQ

Calling reflect.Value.SetInt on a value obtained from reflect.ValueOf(&x).Elem() vs reflect.ValueOf(x) behaves how?

var x int = 10 v1 := reflect.ValueOf(x) v2 := reflect.ValueOf(&x).Elem()