Multiple choice technology programming languages

Components can only be allocated on the -----

  1. Stack

  2. Heap

  3. Register

  4. Floppy

  5. Compact Disk

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

Components in Delphi must be dynamically allocated on the heap because they have lifetimes that extend beyond the function scope and need flexible memory management. The stack is for local variables with automatic lifetimes, registers are CPU storage, and floppy/compact disk are storage media unrelated to runtime memory allocation. Components are created with constructor calls and explicitly freed.