Advanced Go (Golang)
Q66 / 100

What is the unsafe package used for in Go?

Correct! Well done.

Incorrect.

The correct answer is B) Bypassing Go's type safety for low-level operations like pointer arithmetic, struct field offsets, and converting between pointer types

B

Correct Answer

Bypassing Go's type safety for low-level operations like pointer arithmetic, struct field offsets, and converting between pointer types

Explanation

unsafe.Pointer, unsafe.Sizeof, unsafe.Offsetof are used for performance-critical code and C interop (cgo). Breaks type safety — use sparingly.

Progress
66/100