Multiple choice technology programming languages

Which of the following are correct ?

  1. Value types are stored in heap and reference types are stored in stack area.

  2. Boxing allows users to convert value types to reference types

  3. Unboxing allows users to convert value type to reference type.

  4. During runtime boxing creates a temporary reference type box for the object on the heap.

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

Boxing converts value types to reference types by creating an object on the heap and copying the value type value there (Option B and D are correct). Option A is wrong because value types are stored on stack, not heap. Option C is incorrect because unboxing converts reference types back to value types, not value to reference.