Multiple choice technology programming languages

______ Statement Prevents The Garbage Collector From Relocating A Movable Variable?

  1. checked

  2. sealed

  3. readonly

  4. fixed

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In C#, the 'fixed' statement prevents the garbage collector from relocating a movable variable. This is used in unsafe code contexts to pin a variable in memory, typically when working with pointers or interacting with unmanaged code.