Home » C++ Programming » Operators » Question
  1. What do we need to do to pointer for overloading the subscript operator?
    1. store it in heap
    2. reference pointer
    3. dereference pointer
    4. All of above
    5. None of these
Correct Option: C

If you have a pointer to an object of some class type that overloads the subscript operator, you have to dereference that pointer in order to free the memory.



Your comments will be displayed only after manual approval.