Multiple choice general knowledge science & technology

------------------- statement Presents 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

The 'fixed' statement in C# pins a managed variable in memory so the garbage collector cannot relocate it during pointer operations. This is essential when working with unsafe code and pointers, as moving the object would invalidate the pointer address. Checked is for overflow arithmetic, Sealed prevents inheritance, and ReadOnly allows only initialization.