Intermediate
Swift
Q82 / 100
What is Swift's withUnsafeMutablePointer?
Correct! Well done.
Incorrect.
The correct answer is B) Temporarily obtains a mutable raw pointer to a value for low-level or C-interop operations
B
Correct Answer
Temporarily obtains a mutable raw pointer to a value for low-level or C-interop operations
Explanation
withUnsafeMutablePointer(to: &value) { ptr in ptr.pointee = 42 } — the pointer is only valid within the closure and must not escape.
Progress
82/100